I recently discovered Dgraph and am quite impressed with its capabilities. I would like to use Dgraph as the primary store behind a regular golang GraphQL server, which will be responsible for implementing access control, session management and things like Relay edges and connections. As I understand it, this implies steps along these lines:
- Parse the incoming GraphQL query from the client.
- Traverse the parsed query and incrementally build up a Dgraph query.
- Send the consolidated query to Dgraph and get the response.
- Traverse the Dgraqph response and translate it into the desired shape (e.g., with Relay connections).
- Send the translated result back to the GraphQL client.
Does this sound like the right idea? Has anyone done something like this who can recommend one or two golang libraries that will be helpful here? The most popular golang GraphQL library, https://github.com/graphql-go/graphql, seems to be doing to much and requires synchronous resolution at each field in the query.