Building a GraphQL server (using graphql-yoga) using only neo4j-driver (for javascript)


(Shreyansh Zazz) #1

Is it possible to build GraphQL server using just and only neo4j-driver for javascript??
If yes then please guide me how and from where I can start?


(Benoit Simard) #2

Hi,

It should be the same from what the GRAND stack does with apollo-server (yoda include it).
You can find an example for apollo here : https://github.com/grand-stack/grand-stack-movies-workshop/blob/master/graphql/end/src/schema.js

You need to register the neo4j driver inside the context variable and then use it in your resolvers.

Hope it will help you.

Cheers.


(Shreyansh Zazz) #3

Hey Benoit, thanks for your answer. but since I waited for a day I made my own starter kit which you can find here at https://github.com/shreyansh-zazz/nodejs-graphql-neo4j-docker-starter-kit link.
Please share me your advices to improve it.