Skip to content

Egorius1979/GraphQL-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GraphQL API

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.

Quick start

  1. 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

  1. Clone this repo
  • copy and rename env.example to .env

  • npm install or you can use yarn

  1. Сonfigure the connection of microservices to the Database by making the necessary changes in the .env files of microservices

  2. Start microservices from the microservices repository: npm run run:all:dev or npm run run:all:prod

  3. Start GraphQL API app from its repository: npm run dev or npm run prod

How to use

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!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors