Modeling the Book Graph
Once again, let’s go back to our book graph—see this figure which shows our reference book graph.
The following figure shows how this reference graph can be mapped in Dgraph.
Note that this resembles the RDF graph but with properties added to the edges.
We have some choices in how we load our book graph. We can load the data directly, and Dgraph will auto-generate predicates for us. A more principled way of proceeding would be to define a schema with types and predicates and to load that first.
Again, we have another choice. We can define a GraphQL schema, and Dgraph will auto-generate a DQL schema, or we can define a ...
Get Exploring Graphs with Elixir now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.