Dgraph is a horizontally scalable, fast, highly-available, and distributed graph database providing ACID transactions, consistent replication, and linearizable reads.

It also supports a GraphQL-like query syntax, which is very useful for having more fine-grained searching features.

Graph databases, in turn, are databases that use graph structures (like nodes and edges) to represent entity relations and store data.

GraphQL, as the name suggests, is also a technology based on the graph’s area. So, why not mix both?

As you may know, GraphQL is an alternative and robust way to expose API endpoints rather than the usual REST.

It is flexible, language-agnostic, powerful, and very well-accepted by the community. But that doesn’t mean you have to write your data storing logic within a graph database.

This article aims to touch this subject in a practical way.

We’ll create a CRUD with Dgraph that, in turn, will generate scaffolded methods for each one of the queries and mutations. Then, by the use of the GraphQL Playground, we’ll test them out.

#graphql #database #web-development #developer

How Create a CRUD with Dgraph and GraphQL
3.80 GEEK