Search⌘ K
AI Features

Create the DGraph Project

Explore how to create a DGraph project in Elixir by leveraging the dlex package. Learn to set up supervised applications, manage dependencies, connect to the database, and perform basic graph mutations and queries with Dgraph and Elixir.

Create the project

We’ll use the dlex package by Dmitry Russ, which provides a gRPC-based Dgraph client for Elixir. (This was inspired by the earlier ex_dgraph package by Ole Spaarmann.)

Let’s create a project DGraph. Go to the ExGraphsBook home, cd down into the apps directory, and open a new project:

$ mix new d_graph --sup

Note that we are using the --sup flag because we’re going to use a supervised process.

This will add a new d_graph app:

Add dependencies to mix.exs

Let’s cd down into the ...