You can find more info about this repository and how to wrap the REST API it contains with GraphQL here.
The GraphQL API wrapping this REST API can be found here
/users
/users/<id>
/users/<id>/posts
/posts
/posts/<id>
/posts/<id>/user
To see the data returned by the routes, check users.json and posts.json.
git clone [email protected]:nikolasburk/rest-demo.git
cd rest-demo
yarn start
Sample requests:
- http://localhost:3000/users
- http://localhost:3000/posts
- http://localhost:3000/users/user-1
- http://localhost:3000/users/user-1/posts
- http://localhost:3000/posts/post-4
- http://localhost:3000/posts/post-4/user
You can find a live demo of the REST API here.
Sample requests: