V2 and grphql vs graphql+-

Going to build my first dgraph DB :slight_smile:
Will start with version 2 (RC) as I still have a minimum of 2 month development.

However I am a bit confused about latest change in ver2. Should I use GraphQL or maybe GraphQL±?
What are the pro/con of each option?


1 Like

This depends a lot on the culture of the company you work for. If you already have engineers using GraphQL, go to GraphQL. If you want to build something strictly related to the main language of Dgraph. Go from GraphQL+-. But you must choose one of them and use the second only as an extra option for internal cases.

I think that depending on the choice, the two languages ​​complement each other.

GraphQL Pros:

The advantages of using GraphQL are that it has a giant ecosystem out there. Take for example Apollo GraphQL. They have created numerous tools for GraphQL that work with Dgraph’s GraphQL out of the box.

Personally, I’m a fan of Apollo GraphQL.

GraphQL and GraphQL+- in practice are sister languages. If you learn to use one, learning to use the other will not be so difficult.

With GraphQL your front-end team will be always happy xD

GraphQL in Dgraph was created so that you do not have to worry about creating a GraphQL API manually. Making your life easier when building an application. You gain speed with this feature and less hassle of having to align GraphQL+- with your GraphQL API.

GraphQL Cons:

GraphQL does not support all functions and benefits of GraphQL+-. There are no variables, recurse queries, etc. However, the core engineers are working to ensure good alignment with the two languages.

GraphQL+- Pros:

It is a rich language, thought to be something that goes beyond GraphQL and inspired by GraphQL. It follows the needs of the Dgraph database. GraphQL, on the other hand, has to be a broad language that meets the needs of various DBs and APIs out there.

With GraphQL+- you can make complex queries that GraphQL would not be able to do due to its well-defined and standardized Specs in context to the variety of existing DBs and services.

Your queries have direct access to the dataset. There are no limits to what you can do.

GraphQL+- Cons:

You need to learn the nuances of that language. Perhaps for some people, this is bad. Having to learn something more.

Although inspired, it is not directly compatible with GraphQL Specs.



Thanks for the explanation.

As of performance. Is there difference (hidden layers) when using GraphQL?

And, is it possible to define the scheme and query using GraphQL and for few specific queries use GraphQL±?

I don’t think so, if so, it isn’t any different from any GraphQL implementation out there.

You have specific endpoints to do so. The GraphQL queries are bind with the schema. So, if you don’t define your schema, there’s no query or mutation available.

Also, we use custom directives and other Graphql features to make it very close to GraphQL+-. You can check it out at:

The next features includes custom GraphQL logic. Which you gonna be able to control how GraphQL queries do things.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.