Subscriptions
GraphQL subscriptions add real-time capabilities to your API. Subscriptions allow to listen for changes on the database.
The following subscriptions are available when using @neo4j/graphql
:
-
Create - Listen for newly created nodes.
-
Update - Listen for changes to existing nodes.
-
Delete - Listen for deleted nodes.
-
Create Relationship - Listen for newly created relationships.
-
Delete Relationship - Listen for deleted relationships.
All events will be triggered individually, even in events caused by the same Mutation. Events are fired on the creation or deletion of nodes and relationships, and on the update of nodes.
Only changes made through @neo4j/graphql will trigger events. Changes made directly to the database or using the @cypher directive
will not trigger any event.
|
Subscriptions with Auth
Some auth
clauses can be used with subscriptions. How these work is documented here.
Was this page helpful?