@@ -47,7 +47,7 @@ interface Auth {
4747a| You can use the JWT in the request to return the value of the currently logged in User:
4848[source, graphql, indent=0]
4949----
50- type User {
50+ type User @node {
5151 id: String
5252}
5353
@@ -117,7 +117,7 @@ Both approaches are demonstrated here:
117117
118118[source, graphql, indent=0]
119119----
120- type User {
120+ type User @node {
121121 id
122122}
123123
@@ -135,7 +135,7 @@ type Query {
135135
136136[source, graphql, indent=0]
137137----
138- type User {
138+ type User @node {
139139 id
140140}
141141
@@ -185,13 +185,13 @@ In the following example, the field `similarMovies` is bound to the `Movie` type
185185
186186[source, graphql, indent=0]
187187----
188- type Actor {
188+ type Actor @node {
189189 actorId: ID!
190190 name: String
191191 movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT)
192192}
193193
194- type Movie {
194+ type Movie @node {
195195 movieId: ID!
196196 title: String
197197 description: String
@@ -216,7 +216,7 @@ The following example demonstrates a query to return all of the actors in the da
216216
217217[source, graphql, indent=0]
218218----
219- type Actor {
219+ type Actor @node {
220220 actorId: ID!
221221 name: String
222222}
@@ -239,7 +239,7 @@ The following example demonstrates a mutation using a Cypher query to insert a s
239239
240240[source, graphql, indent=0]
241241----
242- type Actor {
242+ type Actor @node {
243243 actorId: ID!
244244 name: String
245245}
@@ -291,7 +291,7 @@ enum Status {
291291 ACTIVE
292292 INACTIVE
293293}
294- type Movie {
294+ type Movie @node {
295295 status: Status @coalesce(value: ACTIVE)
296296}
297297----
@@ -345,7 +345,7 @@ Take, for instance, this schema:
345345[source, javascript, indent=0]
346346----
347347const typeDefs = `
348- type User {
348+ type User @node {
349349 firstName: String!
350350 lastName: String!
351351 fullName: String! @customResolver(requires: "firstName lastName")
@@ -397,13 +397,13 @@ Using a selection set string makes it possible to select fields from related typ
397397[source, javascript, indent=0]
398398----
399399const typeDefs = `
400- type Address {
400+ type Address @node {
401401 houseNumber: Int!
402402 street: String!
403403 city: String!
404404 }
405405
406- type User {
406+ type User @node {
407407 id: ID!
408408 firstName: String!
409409 lastName: String!
@@ -437,7 +437,7 @@ interface Publication {
437437 publicationYear: Int!
438438}
439439
440- type Author {
440+ type Author @node {
441441 name: String!
442442 publications: [Publication!]! @relationship(type: "WROTE", direction: OUT)
443443 publicationsWithAuthor: [String!]!
@@ -446,13 +446,13 @@ type Author {
446446 )
447447}
448448
449- type Book implements Publication {
449+ type Book implements Publication @node {
450450 title: String!
451451 publicationYear: Int!
452452 author: [Author!]! @relationship(type: "WROTE", direction: IN)
453453}
454454
455- type Journal implements Publication {
455+ type Journal implements Publication @node {
456456 subject: String!
457457 publicationYear: Int!
458458 author: [Author!]! @relationship(type: "WROTE", direction: IN)
@@ -468,7 +468,7 @@ interface Publication {
468468 publicationYear: Int!
469469}
470470
471- type Author {
471+ type Author @node {
472472 name: String!
473473 publications: [Publication!]! @relationship(type: "WROTE", direction: OUT)
474474 publicationsWithAuthor: [String!]!
@@ -477,13 +477,13 @@ type Author {
477477 )
478478}
479479
480- type Book implements Publication {
480+ type Book implements Publication @node {
481481 title: String!
482482 publicationYear: Int!
483483 author: [Author!]! @relationship(type: "WROTE", direction: IN)
484484}
485485
486- type Journal implements Publication {
486+ type Journal implements Publication @node {
487487 subject: String!
488488 publicationYear: Int!
489489 author: [Author!]! @relationship(type: "WROTE", direction: IN)
@@ -525,7 +525,7 @@ Type definitions:
525525
526526[source, graphql, indent=0]
527527----
528- type Product {
528+ type Product @node {
529529 name: String!
530530 slug: String! @populatedBy(callback: "slug", operations: [CREATE, UPDATE])
531531}
@@ -561,7 +561,7 @@ For example, if you want a field `modifiedBy`:
561561
562562[source, graphql, indent=0]
563563----
564- type Record {
564+ type Record @node {
565565 content: String!
566566 modifiedBy: @populatedBy(callback: "modifiedBy", operations: [CREATE, UPDATE])
567567}
0 commit comments