Dgraph usage - with DQL or GraphQL or both?

I am curious about how Dgraph is being used in applications:

  1. directly via DQL (GraphQL±) or
  2. use something like Apollo server for GraphQL or
  3. a mix of both DQL and GraphQL (is this even advisable?)

From discussion threads such as these:

This last one describes a stack consisting of Dgraph + [ React + Apollo client 3.0 beta 2 + Typescript + GraphQL Code Generator] but not Apollo server.

So I suspect that DQL is preferred currently and GraphQL will be feature-compatible to DQL at some time in the future. But I could be wrong in assuming this, hence the question.


1 Like

@michaelcompton, @pawan will know better.

A mix of both DQL & GraphQL is acceptable.

Refer: Advanced Queries documentation.

DQL is for advanced users & queries which are not yet supported or cannot be supported by GraphQL.

Checkout the comprehensive list of features that are easy, hard or impossible to port from DQL to GraphQL: GraphQL+- -> Spec Compliant GraphQL


@abhijit-kar Thank You!

Would it be correct in saying that you really don’t need Apollo server if Dgraph is the only data store being used? And you can connect to it using either DQL or GraphQL or both.

Yes & Yes.

1 Like