Inspect the Structs

Learn how to create a graph using the graph struct and to inspect the struct by defining a user-friendly view.

Let’s try out the %GraphCommons.Graph{} struct by creating a new graph. We’ll use a property graph model example here, which generates a minimal graph with two nodes and one edge between them.

Note: Our query.ex file will be similar to the graph.ex file with the term “graph” replaced with “query.”

Default graph

The following example will serve as our default graph.

Get hands-on with 1200+ tech skills courses.