Awesome
Koa-GraphQL-RethinkDB
GraphQL API Server example using Koa, Apollo GraphQL Server & RethinkDB. :rocket:
Notes:
Koa
requires NodeJS v7.6.0 or higher.
Usage
- Install dependencies via Yarn:
yarn
or using npm:
npm install
- Run RethinkDB Server
rethinkdb
- Start GraphQL API Server
yarn start
Optional: Then the server is running you could run the Vue 2 + Typescript client example to consuming this GraphQL API.
GraphiQL
Use the GraphiQL GUI to add demo data. Enter to GraphiQL app at http://localhost:4020/graphiql
Mutations
1. createAuthor:
mutation {
createAuthor(firstName: "Jose Luis", lastName: "Quintana")
}
2. createPost:
mutation {
createPost(title: "Queries and Mutations", authorId: "THE_AUTHOR_ID_HERE", votes: 1)
}
Queries
3. authors with posts query:
{
authors {
id
firstName
lastName
posts
}
}
API
Check out the GraphQL Schema.
Contributions
Feel free to send some Pull request or issue.
License
MIT license
© 2017 José Luis Quintana