November 2022
Intermediate to advanced
294 pages
5h 58m
English
Let’s start with some basic Gremlin queries to get an idea of what to expect.
The gremlex package provides two main modules: Gremlex.Graph and Gremlex.Client.
We’ll first bring these modules into our default namespace to make for easier handling in IEx:
| | iex> alias Gremlex.{Client,Graph} |
| | [Gremlex.Client, Gremlex.Graph] |
Now that that’s done, here’s a sample graph build and query:
| | iex> Graph.g() |> Graph.add_v("Foo") |> Client.query |
| | {:ok, [%Gremlex.Vertex{id: 0, label: "Foo", properties: %{}}]} |
The Graph module supports some, but not all, Gremlin functions and is still in early development. For the sake of brevity, we’ll focus here on sending raw Gremlin queries using the Client module ...
Read now
Unlock full access