You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
:description: This page describes how to customize the behaviour of subscriptions.
4
+
:description: This page describes how to customize the behavior of subscriptions.
5
5
6
6
== Neo4jGraphQLSubscriptionsCDCEngine
7
7
8
-
By default, the GraphQL library will use the same driver passed to `Neo4jGraphQL` to poll for events every second. This behaviour can be changed by creating a custom instance of `Neo4jGraphQLSubscriptionsCDCEngine`.
8
+
By default, the GraphQL library uses the same driver passed to `Neo4jGraphQL` to poll for events every second.
9
+
This behavior can be changed by creating a custom instance of `Neo4jGraphQLSubscriptionsCDCEngine`.
9
10
10
11
The following options can be passed to the constructor:
11
12
12
13
* `driver`: The driver to be used for CDC queries.
13
14
* `pollTime`: The interval, in milliseconds, between queries to CDC.
14
15
Defaults to 1000ms.
15
-
Note that poll time is the period between one request finishing and the next one starting.
16
-
The actual time it takes for CDC events to trigger the subscription also depend on your network.
16
+
Note that poll time is the period between a finished request and the start of the next.
17
+
The actual time it takes for CDC events to trigger the subscription also depends on your network.
17
18
* `queryConfig`: An object with the driver query options to be passed to CDC requests.
18
19
Use the `db` field to define the target database for CDC.
Copy file name to clipboardExpand all lines: modules/ROOT/pages/subscriptions/getting-started.adoc
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,11 +9,12 @@ This guide shows how to start using subscription capabilities on a GraphQL serve
9
9
If you use link:https://studio.apollographql.com/[Apollo Studio], make sure to select the link:https://www.npmjs.com/package/graphql-ws[graphql-ws] implementation in the connection settings.
10
10
====
11
11
12
-
Subscriptions allow to listen to changes to the database, including changes done outside of the GraphQL library.
12
+
Subscriptions can listen to changes to the database, including changes unrelated to the GraphQL library.
13
13
14
14
== Enable subscription capabilities
15
15
16
-
Neo4j GraphQL subscriptions rely on Neo4j Change Data Capture. Make sure to follow the steps described on the link:https://neo4j.com/docs/cdc/current/[CDC Documentation] to enable it in `FULL` mode for your Neo4j instance.
16
+
Neo4j GraphQL subscriptions rely on Neo4j Change Data Capture.
17
+
Make sure to follow the steps described in the link:https://neo4j.com/docs/cdc/current/[CDC Documentation] to enable it in `FULL` mode for your Neo4j instance.
17
18
18
19
Before using subscriptions on a GraphQL server, you must enable them by passing the `subscriptions` feature to `Neo4jGraphQL`:
0 commit comments