Dgraph GraphQL Tour

Introduction

Graphs

So far in this tour, you have deployed a Dgraph Cloud backend and run a few mutations to edit data. But before proceeding further, you’d probably like to understand some basics, like: What is a graph, and what does it have to do with databases?

Graphs describe objects and the interconnections between them. You may have heard of friendship or social network graphs, where data points (people) are connected together through known relationships.

Press Run on the query to the right. The JSON shown in the query response shows just such a social network graph, expressed as JSON.

Graphs aren’t just for social networks, other examples include:

  • Interconnected data, like SQL tables requiring joins
  • Advanced search
  • Recommendation engines
  • Networks, such as computer networks, roads, and telecommunications
  • Processes, such as business and biological processes
  • Events and the causality or other links between them
  • Structures of firms or markets
  • Modeling of geographic or 3D objects

These and many more applications make graphs a natural choice for databases.

1.6 Graphs