Niklas FondbergandGitHub 58ed7fbf6a P5 7617 cleanup market and locale (#10)
* Minor fixes

* Cleanup with adding Locale type

* Add locales to test
2021-08-12 10:51:02 +02:00
2021-06-17 11:04:22 +02:00
WIP
2021-04-06 09:56:18 +02:00
2021-07-26 10:35:52 +02:00
2021-06-17 11:04:22 +02:00
2021-06-17 11:04:22 +02:00
WIP
2021-04-06 09:56:18 +02:00
2021-07-26 10:35:52 +02:00
2021-07-26 10:35:52 +02:00
2021-04-19 12:54:38 +02:00
2021-07-26 10:35:52 +02:00
2021-07-26 10:35:52 +02:00
2021-07-26 10:35:52 +02:00
2021-07-26 10:35:52 +02:00
2021-07-26 10:35:52 +02:00
2021-04-06 15:49:41 +02:00

graphql-api-js

Apollo graphql api server for Photowall

Run it locally

Create an .env file (see .env.example for what to set). Run

$ docker compose build
$ docker compose up

Then head over to The playground GUI in the browser

Run tests

Scripts will create the insert sql files for a randomized fake data postgres database. This database is based of the actual db in photowall project.

npm test

Writing tests

The tests are held in testcontainers testcontainers-node. One container holding a test postgres database and one container started from the Dockerfile containing the Apollo GraphQL server. These containers have connections with each other.

Each test is build around inserting fake data in the empty db, fetching that data through the GraphQL and with raw Sql queries and then comparing the results.

To write new inserts into the DB generate sql files with js in the src/test/db_generator tool. Then load the new sql file in the containerSetup.ts file.

When you have the data you need in the db, write tests in all.test.ts file following the pattern already set.

S
Description
No description provided
Readme
1.4 MiB
Languages
TypeScript 96.2%
Makefile 2.9%
JavaScript 0.7%
Dockerfile 0.2%