Skip to content

Commit cf5a106

Browse files
committed
restored two code listings
1 parent 1d77f3c commit cf5a106

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

modules/ROOT/pages/directives/database-mapping.adoc

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,21 @@ The following query yields a different Cypher query depending on the user JWT:
183183
users {
184184
name
185185
}
186-
}ref::/directives/database-mapping.adoc#_declarerelationship[
186+
}
187+
----
188+
189+
Assuming there is a user with the value `"username": "arthur"` in JWT, the Cypher query looks like:
190+
191+
[source, cypher, indent=0]
192+
----
193+
MATCH (this:arthur)
194+
RETURN this { .name } as this
195+
----
196+
197+
Similarly, context values can be passed directly:
198+
199+
[source, graphql, indent=0]
200+
----
187201
type User @node(label: ["$context.appId"]) {
188202
name: String!
189203
}

0 commit comments

Comments
 (0)