This application is a handy graphql API for six microservices that allows you to create an intuitive query and get a response expanded across all nesting fields in one single response. Simple, convenient, visual.
- Clone repo with microservises here
-
the installation instructions are inside
-
the application is using MongoDB as a database. Feel free to choose any solution for it, however it's highle recommended to use Docker and the official image for it. Docker MongoDB
- Clone this repo
-
copy and rename env.example to .env
-
npm installor you can use yarn
-
Сonfigure the connection of microservices to the Database by making the necessary changes in the .env files of microservices
-
Start microservices from the microservices repository:
npm run run:all:devornpm run run:all:prod -
Start GraphQL API app from its repository:
npm run devornpm run prod
when the microservices connect to the database and the graphql server is also running, follow this link
http://localhost:4000/graphql
You can execute all Queries (get-request) without authorization and authentication. All Mutations (create, update, delete and add) can only be done by authorized users.
To do this, you need to register (Mutation => register), and then log in and get a token (Query => jwt) in the Documentation tab on the left.
In the middle lower part of the screen, click the Headers tab, then click + New header, select Authorization in the field key header and write word Bearer with a space at the end in the value field and put the value of the previously received jwt-token there.
Now you can use all the other mutations from the list.
Good luck!