Basic example of graphql server resolving rethinkdb data.
If you're starting with graphql and you want to connect with a rethinkdb database. This is a good place to start. Nothing fancy just a basic boilerplate.
Install rethinkdb
run rethinkdb:
rethinkdb
Create users
table in rethinkdb.
Run project
npm install && npm start
You will see this in the console:
> node index.js
Client Request:
type your graphql query:
{ usersCount }
and you will get:
Server Anwswer: { usersCount: 0 }
Insert new documents into users
table in rethinkdb data explorer and try again.
I'm looking to implement the best practices for working with graphql and rethinkdb. This is a very basic example but if you feel that you can improve it, please send a PR.