Skip to content

debianw/micro-graph-rest-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GraphQL / REST Architecture support based on micro / Apollo GraphQL

The purpose of this repo is to collect the best ideas of architecting an API that provides both GraphQL and REST endpoints

Install

npm install
npm run start:watch

GraphQL:

curl -X POST \
  http://localhost:4001/graphql \
  -H 'Authorization: Bearer demo' \
  -H 'Content-Type: application/json' \
  -H 'accept-encoding: gzip, deflate' \
  -d '{
	"query": "query getAllUsers { users { id, username, firstName, lastName } }",
	"operationName": "getAllUsers"
}'

REST:

curl http://localhost:4001/api/users

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published