Skip to content
This repository has been archived by the owner on Jun 6, 2020. It is now read-only.

GraphQL API Server example using Koa, Apollo GraphQL Server & RethinkDB. 🚀

License

Notifications You must be signed in to change notification settings

joseluisq/koa-graphql-rethinkdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Koa-GraphQL-RethinkDB

GraphQL API Server example using Koa, Apollo GraphQL Server & RethinkDB. 🚀

Notes:

  • Koa requires NodeJS v7.6.0 or higher.

Usage

  1. Install dependencies via Yarn:
yarn

or using npm:

npm install
  1. Run RethinkDB Server
rethinkdb
  1. 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

koa-graphql-rethinkdb 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

About

GraphQL API Server example using Koa, Apollo GraphQL Server & RethinkDB. 🚀

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published