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
When setting up the default subscriptions for Neo4jGraphQL, now the production-ready CDC engine is used (`Neo4jGraphQLSubscriptionsCDCEngine`) instead of the previous default engine:
43
+
44
+
[source, javascript]
45
+
----
46
+
new Neo4jGraphQL({
47
+
typeDefs,
48
+
driver,
49
+
features: {
50
+
subscriptions: true
51
+
},
52
+
});
53
+
----
54
+
55
+
This means the default subscriptions now require CDC enabled in your database.
56
+
57
+
==== Removed relationship subscriptions
58
+
59
+
The subscriptions operations `*RelationshipCreated` and `*RelationshipDeleted` are no longer supported.
60
+
61
+
For example:
62
+
63
+
[source, graphql, indent=0]
64
+
----
65
+
subscription MovieRelationshipDeleted {
66
+
movieRelationshipCreated {
67
+
movie {
68
+
title
69
+
}
70
+
createdRelationship {
71
+
actors {
72
+
node {
73
+
name
74
+
}
75
+
}
76
+
}
77
+
}
78
+
}
79
+
----
80
+
31
81
=== Removed the deprecated implicit "some" filter from `@relationship`
32
82
33
83
The deprecated implicit "some" filter without operator suffix has been removed from `@relationship` in favor of the explicit `_SOME` filter.
All xref::/types/relationships.adoc[relationships] are created with a direction from one node to another.
76
-
By default, all queries follow the direction defined in the relationship.
77
-
However, in some cases it is necessary to query for all related nodes, regardless of the direction of the relationship.
78
-
This can be achieved with the argument `directed: false`.
79
-
80
-
For example, the following query should return all User friends, regardless of the direction of the relationship `"FRIENDS_WITH"`:
81
-
82
-
[source, graphql, indent=0]
83
-
----
84
-
query {
85
-
users {
86
-
name
87
-
friends: friends(directed: false) {
88
-
name
89
-
}
90
-
}
91
-
}
92
-
----
93
-
94
-
In addition, undirected relationships can also be used in the same fashion with connections.
95
-
For instance, this query is asking for a list of users and their friends' names with an undirected friendship connection:
96
-
97
-
[source, graphql, indent=0]
98
-
----
99
-
query Query {
100
-
users {
101
-
friendsConnection(directed: false) {
102
-
edges {
103
-
node {
104
-
name
105
-
}
106
-
}
107
-
}
108
-
}
109
-
}
110
-
----
111
-
112
-
Keep in mind that *undirected relationships are only supported in queries*.
113
-
The xref::/types/relationships.adoc#_querydirection[type definitions] for a relationship may define a different behavior, so the `directed` option may not be available in some cases.
0 commit comments