November 2022
Intermediate to advanced
294 pages
5h 58m
English
We can do graph management of our Neo4j instance using Cypher queries over Bolt.Sips to add and delete graphs. But we’d ideally like to bring this under our common graph services API so we can operate at a higher level of abstraction, which will make for less context switching when swapping between graph services.
Let’s set up a graph service for our PropertyGraph project now:
| | defmodule PropertyGraph.Service do |
| | @behaviour GraphCommons.Service |
| | |
| | # ... |
| | |
| | end |
Note that this module is going to implement the GraphCommons.Service behaviour so we use the module attribute @behaviour.
We’ll first need to set up our Cypher queries for deleting all nodes and relationships and for reading them: