diff --git a/.changeset/weak-planes-punch.md b/.changeset/weak-planes-punch.md new file mode 100644 index 0000000000..7329b6df60 --- /dev/null +++ b/.changeset/weak-planes-punch.md @@ -0,0 +1,5 @@ +--- +"@neo4j/graphql": major +--- + +All labels and field names are escaped in the generated Cypher diff --git a/packages/graphql/package.json b/packages/graphql/package.json index 6dec802211..9f3a70ebda 100644 --- a/packages/graphql/package.json +++ b/packages/graphql/package.json @@ -92,7 +92,7 @@ "@graphql-tools/resolvers-composition": "^7.0.0", "@graphql-tools/schema": "10.0.0", "@graphql-tools/utils": "^10.0.0", - "@neo4j/cypher-builder": "~0.6.0", + "@neo4j/cypher-builder": "^1.0.0", "camelcase": "^6.3.0", "debug": "^4.3.4", "deep-equal": "^2.0.5", diff --git a/packages/graphql/src/classes/Node.test.ts b/packages/graphql/src/classes/Node.test.ts index db7b208006..4fb3f20625 100644 --- a/packages/graphql/src/classes/Node.test.ts +++ b/packages/graphql/src/classes/Node.test.ts @@ -869,7 +869,7 @@ describe("Node", () => { const labelString = node.getLabelString(context); expect(labels).toEqual(["Movie"]); - expect(labelString).toBe(":`Movie`"); + expect(labelString).toBe(":Movie"); }); test("should return labels updated with context values from Context", () => { @@ -891,7 +891,7 @@ describe("Node", () => { const labelString = node.getLabelString(context); expect(labels).toEqual(["Movie"]); - expect(labelString).toBe(":`Movie`"); + expect(labelString).toBe(":Movie"); }); test("should return additional labels updated with jwt values from Context", () => { @@ -916,7 +916,7 @@ describe("Node", () => { const labelString = node.getLabelString(context); expect(labels).toEqual(["Film", "Movie"]); - expect(labelString).toBe(":`Film`:`Movie`"); + expect(labelString).toBe(":Film:Movie"); }); }); }); diff --git a/packages/graphql/src/classes/NodeDirective.test.ts b/packages/graphql/src/classes/NodeDirective.test.ts index 767b582d5e..ba6012088d 100644 --- a/packages/graphql/src/classes/NodeDirective.test.ts +++ b/packages/graphql/src/classes/NodeDirective.test.ts @@ -27,28 +27,28 @@ describe("NodeDirective", () => { const instance = new NodeDirective({}); const labelString = instance.getLabelsString("MyLabel", defaultContext); - expect(labelString).toBe(":`MyLabel`"); + expect(labelString).toBe(":MyLabel"); }); test("should generate label string with directive label", () => { const instance = new NodeDirective({ labels: ["MyOtherLabel"] }); const labelString = instance.getLabelsString("MyLabel", defaultContext); - expect(labelString).toBe(":`MyOtherLabel`"); + expect(labelString).toBe(":MyOtherLabel"); }); test("should generate label string adding additional labels to input typename", () => { const instance = new NodeDirective({ labels: ["MyLabel", "Label1", "Label2"] }); const labelString = instance.getLabelsString("MyLabel", defaultContext); - expect(labelString).toBe(":`MyLabel`:`Label1`:`Label2`"); + expect(labelString).toBe(":MyLabel:Label1:Label2"); }); test("should generate label string adding additional labels to directive label", () => { const instance = new NodeDirective({ labels: ["MyOtherLabel", "Label1", "Label2"] }); const labelString = instance.getLabelsString("MyLabel", defaultContext); - expect(labelString).toBe(":`MyOtherLabel`:`Label1`:`Label2`"); + expect(labelString).toBe(":MyOtherLabel:Label1:Label2"); }); test("should throw an error if there are no labels", () => { @@ -64,7 +64,7 @@ describe("NodeDirective", () => { labels: ["label", "$context.escapeTest1", "$context.escapeTest2"], }); const labelString = instance.getLabelsString("label", context); - expect(labelString).toBe(":`label`:`123-321`:`He``l``lo`"); + expect(labelString).toBe(":label:`123-321`:`He``l``lo`"); }); test("should escape jwt labels", () => { @@ -73,7 +73,7 @@ describe("NodeDirective", () => { labels: ["label", "$jwt.escapeTest1", "$jwt.escapeTest2"], }); const labelString = instance.getLabelsString("label", context); - expect(labelString).toBe(":`label`:`123-321`:`He``l``lo`"); + expect(labelString).toBe(":label:`123-321`:`He``l``lo`"); }); test("should throw if jwt variable is missing in context", () => { diff --git a/packages/graphql/src/schema/get-relationship-meta.test.ts b/packages/graphql/src/schema/get-relationship-meta.test.ts index 0698db7e4d..5702fbecf6 100644 --- a/packages/graphql/src/schema/get-relationship-meta.test.ts +++ b/packages/graphql/src/schema/get-relationship-meta.test.ts @@ -315,7 +315,7 @@ describe("getRelationshipMeta", () => { const result = getRelationshipMeta(field); expect(result).toMatchObject({ - type: "`ACTED_IN`", + type: "ACTED_IN", direction: "IN", properties: "ActedIn", }); @@ -387,7 +387,7 @@ describe("getRelationshipMeta", () => { const result = getRelationshipMeta(field); expect(result).toMatchObject({ - type: "`ACTED_IN`", + type: "ACTED_IN", direction: "IN", queryDirection: "DEFAULT_UNDIRECTED", }); @@ -559,7 +559,7 @@ describe("getRelationshipMeta", () => { const result = getRelationshipMeta(field); expect(result).toMatchObject({ - type: "`ACTED_IN`", + type: "ACTED_IN", direction: "IN", nestedOperations: ["CONNECT", "CREATE"], }); @@ -619,7 +619,7 @@ describe("getRelationshipMeta", () => { const result = getRelationshipMeta(field); expect(result).toMatchObject({ - type: "`ACTED_IN`", + type: "ACTED_IN", direction: "IN", properties: "ActedIn", queryDirection: "DEFAULT_UNDIRECTED", diff --git a/packages/graphql/src/utils/case-where.test.ts b/packages/graphql/src/utils/case-where.test.ts index ecafef72db..ba5931081a 100644 --- a/packages/graphql/src/utils/case-where.test.ts +++ b/packages/graphql/src/utils/case-where.test.ts @@ -27,8 +27,8 @@ describe("caseWhere", () => { const { cypher } = clause.build("myPrefix"); expect(cypher).toMatchInlineSnapshot(` "WITH *, CASE true = true - WHEN true THEN [ myPrefixvar0, myPrefixvar1 ] - ELSE [ NULL, NULL ] + WHEN true THEN [myPrefixvar0, myPrefixvar1] + ELSE [NULL, NULL] END AS myPrefixvar2 WITH *, myPrefixvar2[0] AS myPrefixvar0, myPrefixvar2[1] AS myPrefixvar1" `); diff --git a/packages/graphql/tests/tck/advanced-filtering.test.ts b/packages/graphql/tests/tck/advanced-filtering.test.ts index 167fbd70d4..a9ee2a3eef 100644 --- a/packages/graphql/tests/tck/advanced-filtering.test.ts +++ b/packages/graphql/tests/tck/advanced-filtering.test.ts @@ -79,7 +79,7 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this._id IN $param0 RETURN this { ._id } AS this" `); @@ -105,7 +105,7 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.id =~ $param0 RETURN this { .id } AS this" `); @@ -129,7 +129,7 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE NOT (this.id = $param0) RETURN this { .id } AS this" `); @@ -153,7 +153,7 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE NOT (this.id IN $param0) RETURN this { .id } AS this" `); @@ -179,7 +179,7 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.id CONTAINS $param0 RETURN this { .id } AS this" `); @@ -203,7 +203,7 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE NOT (this.id CONTAINS $param0) RETURN this { .id } AS this" `); @@ -227,7 +227,7 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.id STARTS WITH $param0 RETURN this { .id } AS this" `); @@ -251,7 +251,7 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE NOT (this.id STARTS WITH $param0) RETURN this { .id } AS this" `); @@ -275,7 +275,7 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.id ENDS WITH $param0 RETURN this { .id } AS this" `); @@ -299,7 +299,7 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE NOT (this.id ENDS WITH $param0) RETURN this { .id } AS this" `); @@ -323,7 +323,7 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.actorCount < $param0 RETURN this { .actorCount } AS this" `); @@ -350,7 +350,7 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.budget < $param0 RETURN this { .budget } AS this" `); @@ -376,7 +376,7 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title < $param0 RETURN this { .title } AS this" `); @@ -400,7 +400,7 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.actorCount <= $param0 RETURN this { .actorCount } AS this" `); @@ -427,7 +427,7 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.budget <= $param0 RETURN this { .budget } AS this" `); @@ -453,7 +453,7 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title <= $param0 RETURN this { .title } AS this" `); @@ -477,7 +477,7 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.actorCount > $param0 RETURN this { .actorCount } AS this" `); @@ -504,7 +504,7 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.budget > $param0 RETURN this { .budget } AS this" `); @@ -530,7 +530,7 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title > $param0 RETURN this { .title } AS this" `); @@ -554,7 +554,7 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.actorCount >= $param0 RETURN this { .actorCount } AS this" `); @@ -581,7 +581,7 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.budget >= $param0 RETURN this { .budget } AS this" `); @@ -607,7 +607,7 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title >= $param0 RETURN this { .title } AS this" `); @@ -632,9 +632,9 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE EXISTS { - MATCH (this)-[:\`IN_GENRE\`]->(this0:\`Genre\`) + MATCH (this)-[:IN_GENRE]->(this0:Genre) WHERE this0.name = $param0 } RETURN this { .actorCount } AS this" @@ -659,9 +659,9 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE NOT (EXISTS { - MATCH (this)-[:\`IN_GENRE\`]->(this0:\`Genre\`) + MATCH (this)-[:IN_GENRE]->(this0:Genre) WHERE this0.name = $param0 }) RETURN this { .actorCount } AS this" @@ -691,12 +691,12 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE (EXISTS { - MATCH (this)-[:\`IN_GENRE\`]->(this0:\`Genre\`) + MATCH (this)-[:IN_GENRE]->(this0:Genre) WHERE this0.name = $param0 } AND NOT (EXISTS { - MATCH (this)-[:\`IN_GENRE\`]->(this0:\`Genre\`) + MATCH (this)-[:IN_GENRE]->(this0:Genre) WHERE NOT (this0.name = $param0) })) RETURN this { .actorCount } AS this" @@ -713,9 +713,9 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE NOT (EXISTS { - MATCH (this)-[:\`IN_GENRE\`]->(this0:\`Genre\`) + MATCH (this)-[:IN_GENRE]->(this0:Genre) WHERE this0.name = $param0 }) RETURN this { .actorCount } AS this" @@ -732,8 +732,8 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) - WHERE single(this0 IN [(this)-[:\`IN_GENRE\`]->(this0:\`Genre\`) WHERE this0.name = $param0 | 1] WHERE true) + "MATCH (this:Movie) + WHERE single(this0 IN [(this)-[:IN_GENRE]->(this0:Genre) WHERE this0.name = $param0 | 1] WHERE true) RETURN this { .actorCount } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -748,9 +748,9 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE EXISTS { - MATCH (this)-[:\`IN_GENRE\`]->(this0:\`Genre\`) + MATCH (this)-[:IN_GENRE]->(this0:Genre) WHERE this0.name = $param0 } RETURN this { .actorCount } AS this" @@ -777,9 +777,9 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE EXISTS { - MATCH (this)-[this0:\`IN_GENRE\`]->(this1:\`Genre\`) + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) WHERE this1.name = $param0 } RETURN this { .actorCount } AS this" @@ -804,9 +804,9 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE NOT (EXISTS { - MATCH (this)-[this0:\`IN_GENRE\`]->(this1:\`Genre\`) + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) WHERE this1.name = $param0 }) RETURN this { .actorCount } AS this" @@ -836,12 +836,12 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE (EXISTS { - MATCH (this)-[this0:\`IN_GENRE\`]->(this1:\`Genre\`) + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) WHERE this1.name = $param0 } AND NOT (EXISTS { - MATCH (this)-[this0:\`IN_GENRE\`]->(this1:\`Genre\`) + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) WHERE NOT (this1.name = $param0) })) RETURN this { .actorCount } AS this" @@ -858,9 +858,9 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE NOT (EXISTS { - MATCH (this)-[this0:\`IN_GENRE\`]->(this1:\`Genre\`) + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) WHERE this1.name = $param0 }) RETURN this { .actorCount } AS this" @@ -877,8 +877,8 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) - WHERE single(this0 IN [(this)-[this1:\`IN_GENRE\`]->(this0:\`Genre\`) WHERE this0.name = $param0 | 1] WHERE true) + "MATCH (this:Movie) + WHERE single(this0 IN [(this)-[this1:IN_GENRE]->(this0:Genre) WHERE this0.name = $param0 | 1] WHERE true) RETURN this { .actorCount } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -893,9 +893,9 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE EXISTS { - MATCH (this)-[this0:\`IN_GENRE\`]->(this1:\`Genre\`) + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) WHERE this1.name = $param0 } RETURN this { .actorCount } AS this" diff --git a/packages/graphql/tests/tck/aggregations/alias-directive.test.ts b/packages/graphql/tests/tck/aggregations/alias-directive.test.ts index ef4a56ecea..80ed84044e 100644 --- a/packages/graphql/tests/tck/aggregations/alias-directive.test.ts +++ b/packages/graphql/tests/tck/aggregations/alias-directive.test.ts @@ -69,7 +69,7 @@ describe("Cypher Aggregations Many with Alias directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { id: { shortest: min(this._id), longest: max(this._id) }, title: { shortest: reduce(aggVar = collect(this._title)[0], current IN collect(this._title) | CASE diff --git a/packages/graphql/tests/tck/aggregations/alias.test.ts b/packages/graphql/tests/tck/aggregations/alias.test.ts index ef9dbeda23..c9699c6773 100644 --- a/packages/graphql/tests/tck/aggregations/alias.test.ts +++ b/packages/graphql/tests/tck/aggregations/alias.test.ts @@ -70,7 +70,7 @@ describe("Cypher Aggregations Many while Alias fields", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { _count: count(this), _id: { _shortest: min(this.id), _longest: max(this.id) }, _title: { _shortest: reduce(aggVar = collect(this.title)[0], current IN collect(this.title) | CASE diff --git a/packages/graphql/tests/tck/aggregations/auth.test.ts b/packages/graphql/tests/tck/aggregations/auth.test.ts index 3546586101..ae76f3ab13 100644 --- a/packages/graphql/tests/tck/aggregations/auth.test.ts +++ b/packages/graphql/tests/tck/aggregations/auth.test.ts @@ -83,7 +83,7 @@ describe("Cypher Aggregations with Auth", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE (($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN { count: count(this) }" @@ -114,7 +114,7 @@ describe("Cypher Aggregations with Auth", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE (this.name = $param0 AND (($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]))) RETURN { count: count(this) }" @@ -149,7 +149,7 @@ describe("Cypher Aggregations with Auth", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE (($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH * @@ -185,7 +185,7 @@ describe("Cypher Aggregations with Auth", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE (($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH * @@ -221,7 +221,7 @@ describe("Cypher Aggregations with Auth", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE (($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH * @@ -257,7 +257,7 @@ describe("Cypher Aggregations with Auth", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE (($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH * @@ -293,7 +293,7 @@ describe("Cypher Aggregations with Auth", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE (($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH * @@ -343,7 +343,7 @@ describe("Cypher Aggregations with Auth", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE (($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH * diff --git a/packages/graphql/tests/tck/aggregations/bigint.test.ts b/packages/graphql/tests/tck/aggregations/bigint.test.ts index 3b8ecf8309..53557e5e76 100644 --- a/packages/graphql/tests/tck/aggregations/bigint.test.ts +++ b/packages/graphql/tests/tck/aggregations/bigint.test.ts @@ -52,7 +52,7 @@ describe("Cypher Aggregations BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`File\`) + "MATCH (this:File) RETURN { size: { min: min(this.size) } }" `); @@ -73,7 +73,7 @@ describe("Cypher Aggregations BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`File\`) + "MATCH (this:File) RETURN { size: { max: max(this.size) } }" `); @@ -94,7 +94,7 @@ describe("Cypher Aggregations BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`File\`) + "MATCH (this:File) RETURN { size: { average: avg(this.size) } }" `); @@ -115,7 +115,7 @@ describe("Cypher Aggregations BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`File\`) + "MATCH (this:File) RETURN { size: { sum: sum(this.size) } }" `); @@ -139,7 +139,7 @@ describe("Cypher Aggregations BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`File\`) + "MATCH (this:File) RETURN { size: { min: min(this.size), max: max(this.size), average: avg(this.size), sum: sum(this.size) } }" `); diff --git a/packages/graphql/tests/tck/aggregations/count.test.ts b/packages/graphql/tests/tck/aggregations/count.test.ts index 4d7606c9d7..0ac1a5de54 100644 --- a/packages/graphql/tests/tck/aggregations/count.test.ts +++ b/packages/graphql/tests/tck/aggregations/count.test.ts @@ -50,7 +50,7 @@ describe("Cypher Aggregations Count", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { count: count(this) }" `); @@ -69,7 +69,7 @@ describe("Cypher Aggregations Count", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 RETURN { count: count(this) }" `); diff --git a/packages/graphql/tests/tck/aggregations/datetime.test.ts b/packages/graphql/tests/tck/aggregations/datetime.test.ts index 28de418596..6133ba98b9 100644 --- a/packages/graphql/tests/tck/aggregations/datetime.test.ts +++ b/packages/graphql/tests/tck/aggregations/datetime.test.ts @@ -52,7 +52,7 @@ describe("Cypher Aggregations DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { createdAt: { min: apoc.date.convertFormat(toString(min(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } }" `); @@ -73,7 +73,7 @@ describe("Cypher Aggregations DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { createdAt: { max: apoc.date.convertFormat(toString(max(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } }" `); @@ -95,7 +95,7 @@ describe("Cypher Aggregations DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { createdAt: { min: apoc.date.convertFormat(toString(min(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\"), max: apoc.date.convertFormat(toString(max(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } }" `); diff --git a/packages/graphql/tests/tck/aggregations/duration.test.ts b/packages/graphql/tests/tck/aggregations/duration.test.ts index b358cf840e..13f90a2d5c 100644 --- a/packages/graphql/tests/tck/aggregations/duration.test.ts +++ b/packages/graphql/tests/tck/aggregations/duration.test.ts @@ -52,7 +52,7 @@ describe("Cypher Aggregations Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { screenTime: { min: min(this.screenTime) } }" `); @@ -73,7 +73,7 @@ describe("Cypher Aggregations Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { screenTime: { max: max(this.screenTime) } }" `); @@ -95,7 +95,7 @@ describe("Cypher Aggregations Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { screenTime: { min: min(this.screenTime), max: max(this.screenTime) } }" `); diff --git a/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-alias.test.ts b/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-alias.test.ts index aeff63e066..09f6172383 100644 --- a/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-alias.test.ts +++ b/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-alias.test.ts @@ -67,10 +67,10 @@ describe("Field Level Aggregations Alias", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this1:\`ACTED_IN\`]-(this0:\`Actor\`) + MATCH (this)<-[this1:ACTED_IN]-(this0:Actor) WITH this0 ORDER BY size(this0.name) DESC WITH collect(this0.name) AS list @@ -100,10 +100,10 @@ describe("Field Level Aggregations Alias", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) RETURN { min: min(this0.screentime), max: max(this0.screentime), average: avg(this0.screentime), sum: sum(this0.screentime) } AS var2 } RETURN this { actorsAggregate: { edge: { time: var2 } } } AS this" diff --git a/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-edge.test.ts b/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-edge.test.ts index ef8a43db7f..e04aa903c1 100644 --- a/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-edge.test.ts +++ b/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-edge.test.ts @@ -70,10 +70,10 @@ describe("Field Level Aggregations", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) RETURN { min: min(this0.screentime), max: max(this0.screentime), average: avg(this0.screentime), sum: sum(this0.screentime) } AS var2 } RETURN this { actorsAggregate: { edge: { screentime: var2 } } } AS this" diff --git a/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-labels.test.ts b/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-labels.test.ts index ab40a5bc91..229f26f87b 100644 --- a/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-labels.test.ts +++ b/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-labels.test.ts @@ -67,10 +67,10 @@ describe("Field Level Aggregations Alias", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Film\`) + "MATCH (this:Film) CALL { WITH this - MATCH (this)<-[this1:\`ACTED_IN\`]-(this0:\`Person\`) + MATCH (this)<-[this1:ACTED_IN]-(this0:Person) WITH this0 ORDER BY size(this0.name) DESC WITH collect(this0.name) AS list diff --git a/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-where.test.ts b/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-where.test.ts index afe2b34a99..7031d43111 100644 --- a/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-where.test.ts +++ b/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-where.test.ts @@ -62,10 +62,10 @@ describe("Field Level Aggregations Where", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Person\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Person) WHERE this1.age > $param0 RETURN count(this1) AS var2 } @@ -100,16 +100,16 @@ describe("Field Level Aggregations Where", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Person\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Person) WHERE this1.name CONTAINS $param0 RETURN count(this1) AS var2 } CALL { WITH this - MATCH (this)<-[this3:\`DIRECTED\`]-(this4:\`Person\`) + MATCH (this)<-[this3:DIRECTED]-(this4:Person) WHERE this4.name CONTAINS $param1 RETURN count(this4) AS var5 } diff --git a/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations.test.ts b/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations.test.ts index ac3fb5d458..6fc1bba7ff 100644 --- a/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations.test.ts +++ b/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations.test.ts @@ -61,10 +61,10 @@ describe("Field Level Aggregations", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) RETURN count(this1) AS var2 } RETURN this { .title, actorsAggregate: { count: var2 } } AS this" @@ -93,15 +93,15 @@ describe("Field Level Aggregations", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) RETURN count(this1) AS var2 } CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WITH this1 ORDER BY size(this1.name) DESC WITH collect(this1.name) AS list @@ -134,10 +134,10 @@ describe("Field Level Aggregations", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this1:\`ACTED_IN\`]-(this0:\`Actor\`) + MATCH (this)<-[this1:ACTED_IN]-(this0:Actor) RETURN { min: min(this0.age), max: max(this0.age), average: avg(this0.age), sum: sum(this0.age) } AS var2 } RETURN this { actorsAggregate: { node: { age: var2 } } } AS this" @@ -166,10 +166,10 @@ describe("Field Level Aggregations", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this1:\`ACTED_IN\`]-(this0:\`Actor\`) + MATCH (this)<-[this1:ACTED_IN]-(this0:Actor) WITH this0 ORDER BY size(this0.name) DESC WITH collect(this0.name) AS list @@ -199,10 +199,10 @@ describe("Field Level Aggregations", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this - MATCH (this)-[this1:\`ACTED_IN\`]->(this0:\`Movie\`) + MATCH (this)-[this1:ACTED_IN]->(this0:Movie) RETURN { min: apoc.date.convertFormat(toString(min(this0.released)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\"), max: apoc.date.convertFormat(toString(max(this0.released)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } AS var2 } RETURN this { moviesAggregate: { node: { released: var2 } } } AS this" diff --git a/packages/graphql/tests/tck/aggregations/float.test.ts b/packages/graphql/tests/tck/aggregations/float.test.ts index dbb57aa898..72e8403494 100644 --- a/packages/graphql/tests/tck/aggregations/float.test.ts +++ b/packages/graphql/tests/tck/aggregations/float.test.ts @@ -52,7 +52,7 @@ describe("Cypher Aggregations Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { actorCount: { min: min(this.actorCount) } }" `); @@ -73,7 +73,7 @@ describe("Cypher Aggregations Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { actorCount: { max: max(this.actorCount) } }" `); @@ -94,7 +94,7 @@ describe("Cypher Aggregations Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { actorCount: { average: avg(this.actorCount) } }" `); @@ -115,7 +115,7 @@ describe("Cypher Aggregations Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { actorCount: { sum: sum(this.actorCount) } }" `); @@ -139,7 +139,7 @@ describe("Cypher Aggregations Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { actorCount: { min: min(this.actorCount), max: max(this.actorCount), average: avg(this.actorCount), sum: sum(this.actorCount) } }" `); diff --git a/packages/graphql/tests/tck/aggregations/id.test.ts b/packages/graphql/tests/tck/aggregations/id.test.ts index 04ede12ba7..3f94e47168 100644 --- a/packages/graphql/tests/tck/aggregations/id.test.ts +++ b/packages/graphql/tests/tck/aggregations/id.test.ts @@ -52,7 +52,7 @@ describe("Cypher Aggregations ID", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { id: { shortest: min(this.id) } }" `); @@ -73,7 +73,7 @@ describe("Cypher Aggregations ID", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { id: { longest: max(this.id) } }" `); @@ -95,7 +95,7 @@ describe("Cypher Aggregations ID", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { id: { shortest: min(this.id), longest: max(this.id) } }" `); diff --git a/packages/graphql/tests/tck/aggregations/int.test.ts b/packages/graphql/tests/tck/aggregations/int.test.ts index 30bf5126d2..b156e62d2d 100644 --- a/packages/graphql/tests/tck/aggregations/int.test.ts +++ b/packages/graphql/tests/tck/aggregations/int.test.ts @@ -52,7 +52,7 @@ describe("Cypher Aggregations Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { imdbRating: { min: min(this.imdbRating) } }" `); @@ -73,7 +73,7 @@ describe("Cypher Aggregations Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { imdbRating: { max: max(this.imdbRating) } }" `); @@ -94,7 +94,7 @@ describe("Cypher Aggregations Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { imdbRating: { average: avg(this.imdbRating) } }" `); @@ -115,7 +115,7 @@ describe("Cypher Aggregations Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { imdbRating: { sum: sum(this.imdbRating) } }" `); @@ -139,7 +139,7 @@ describe("Cypher Aggregations Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { imdbRating: { min: min(this.imdbRating), max: max(this.imdbRating), average: avg(this.imdbRating), sum: sum(this.imdbRating) } }" `); diff --git a/packages/graphql/tests/tck/aggregations/label.test.ts b/packages/graphql/tests/tck/aggregations/label.test.ts index 141b655d8e..0939dfb295 100644 --- a/packages/graphql/tests/tck/aggregations/label.test.ts +++ b/packages/graphql/tests/tck/aggregations/label.test.ts @@ -76,7 +76,7 @@ describe("Cypher Aggregations Many while Alias fields", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Film\`) + "MATCH (this:Film) RETURN { _id: { _shortest: min(this.id), _longest: max(this.id) }, _title: { _shortest: reduce(aggVar = collect(this.title)[0], current IN collect(this.title) | CASE @@ -125,7 +125,7 @@ describe("Cypher Aggregations Many while Alias fields", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`:\`Person\`:\`Alien\`) + "MATCH (this:Actor:Person:Alien) RETURN { _id: { _shortest: min(this.id), _longest: max(this.id) }, _name: { _shortest: reduce(aggVar = collect(this.name)[0], current IN collect(this.name) | CASE diff --git a/packages/graphql/tests/tck/aggregations/localdatetime.test.ts b/packages/graphql/tests/tck/aggregations/localdatetime.test.ts index 5192acf48a..bc023e8470 100644 --- a/packages/graphql/tests/tck/aggregations/localdatetime.test.ts +++ b/packages/graphql/tests/tck/aggregations/localdatetime.test.ts @@ -52,7 +52,7 @@ describe("Cypher Aggregations LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { createdAt: { min: min(this.createdAt) } }" `); @@ -73,7 +73,7 @@ describe("Cypher Aggregations LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { createdAt: { max: max(this.createdAt) } }" `); @@ -95,7 +95,7 @@ describe("Cypher Aggregations LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { createdAt: { min: min(this.createdAt), max: max(this.createdAt) } }" `); diff --git a/packages/graphql/tests/tck/aggregations/localtime.test.ts b/packages/graphql/tests/tck/aggregations/localtime.test.ts index 5fdccb2afe..e239f11cc0 100644 --- a/packages/graphql/tests/tck/aggregations/localtime.test.ts +++ b/packages/graphql/tests/tck/aggregations/localtime.test.ts @@ -52,7 +52,7 @@ describe("Cypher Aggregations LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { createdAt: { min: min(this.createdAt) } }" `); @@ -73,7 +73,7 @@ describe("Cypher Aggregations LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { createdAt: { max: max(this.createdAt) } }" `); @@ -95,7 +95,7 @@ describe("Cypher Aggregations LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { createdAt: { min: min(this.createdAt), max: max(this.createdAt) } }" `); diff --git a/packages/graphql/tests/tck/aggregations/many.test.ts b/packages/graphql/tests/tck/aggregations/many.test.ts index ddc0733834..387594c091 100644 --- a/packages/graphql/tests/tck/aggregations/many.test.ts +++ b/packages/graphql/tests/tck/aggregations/many.test.ts @@ -69,7 +69,7 @@ describe("Cypher Aggregations Many", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { id: { shortest: min(this.id), longest: max(this.id) }, title: { shortest: reduce(aggVar = collect(this.title)[0], current IN collect(this.title) | CASE diff --git a/packages/graphql/tests/tck/aggregations/string.test.ts b/packages/graphql/tests/tck/aggregations/string.test.ts index 1f951e2fdb..34b57739c8 100644 --- a/packages/graphql/tests/tck/aggregations/string.test.ts +++ b/packages/graphql/tests/tck/aggregations/string.test.ts @@ -52,7 +52,7 @@ describe("Cypher Aggregations String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { title: { shortest: reduce(aggVar = collect(this.title)[0], current IN collect(this.title) | CASE @@ -80,7 +80,7 @@ describe("Cypher Aggregations String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { title: { longest: reduce(aggVar = collect(this.title)[0], current IN collect(this.title) | CASE @@ -109,7 +109,7 @@ describe("Cypher Aggregations String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { title: { shortest: reduce(aggVar = collect(this.title)[0], current IN collect(this.title) | CASE diff --git a/packages/graphql/tests/tck/aggregations/time.test.ts b/packages/graphql/tests/tck/aggregations/time.test.ts index 122fc33329..9c412ea313 100644 --- a/packages/graphql/tests/tck/aggregations/time.test.ts +++ b/packages/graphql/tests/tck/aggregations/time.test.ts @@ -52,7 +52,7 @@ describe("Cypher Aggregations Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { createdAt: { min: min(this.createdAt) } }" `); @@ -73,7 +73,7 @@ describe("Cypher Aggregations Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { createdAt: { max: max(this.createdAt) } }" `); @@ -95,7 +95,7 @@ describe("Cypher Aggregations Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) RETURN { createdAt: { min: min(this.createdAt), max: max(this.createdAt) } }" `); diff --git a/packages/graphql/tests/tck/aggregations/where/count.test.ts b/packages/graphql/tests/tck/aggregations/where/count.test.ts index abaee4e405..d7ff0b6926 100644 --- a/packages/graphql/tests/tck/aggregations/where/count.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/count.test.ts @@ -55,10 +55,10 @@ describe("Cypher Aggregations where with count", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN count(this1) = $param0 AS var2 } WITH * @@ -88,10 +88,10 @@ describe("Cypher Aggregations where with count", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN count(this1) < $param0 AS var2 } WITH * @@ -121,10 +121,10 @@ describe("Cypher Aggregations where with count", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN count(this1) <= $param0 AS var2 } WITH * @@ -154,10 +154,10 @@ describe("Cypher Aggregations where with count", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN count(this1) > $param0 AS var2 } WITH * @@ -187,10 +187,10 @@ describe("Cypher Aggregations where with count", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN count(this1) >= $param0 AS var2 } WITH * diff --git a/packages/graphql/tests/tck/aggregations/where/edge/bigint.test.ts b/packages/graphql/tests/tck/aggregations/where/edge/bigint.test.ts index 36596bb69d..1a315ce7cb 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/bigint.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/bigint.test.ts @@ -60,10 +60,10 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someBigInt) WHERE var2 = $param0) AS var3 } WITH * @@ -93,10 +93,10 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0._someBigIntAlias) WHERE var2 = $param0) AS var3 } WITH * @@ -126,10 +126,10 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someBigInt) WHERE var2 > $param0) AS var3 } WITH * @@ -159,10 +159,10 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someBigInt) WHERE var2 >= $param0) AS var3 } WITH * @@ -192,10 +192,10 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someBigInt) WHERE var2 < $param0) AS var3 } WITH * @@ -225,10 +225,10 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someBigInt) WHERE var2 <= $param0) AS var3 } WITH * @@ -258,10 +258,10 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this0.someBigInt) = $param0 AS var2 } WITH * @@ -291,10 +291,10 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this0.someBigInt) > $param0 AS var2 } WITH * @@ -324,10 +324,10 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this0.someBigInt) >= $param0 AS var2 } WITH * @@ -357,10 +357,10 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this0.someBigInt) < $param0 AS var2 } WITH * @@ -390,10 +390,10 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this0.someBigInt) <= $param0 AS var2 } WITH * @@ -423,10 +423,10 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN sum(this0.someBigInt) = $param0 AS var2 } WITH * @@ -456,10 +456,10 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN sum(this0.someBigInt) > $param0 AS var2 } WITH * @@ -489,10 +489,10 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN sum(this0.someBigInt) >= $param0 AS var2 } WITH * @@ -522,10 +522,10 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN sum(this0.someBigInt) < $param0 AS var2 } WITH * @@ -555,10 +555,10 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN sum(this0.someBigInt) <= $param0 AS var2 } WITH * @@ -588,10 +588,10 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someBigInt) = $param0 AS var2 } WITH * @@ -621,10 +621,10 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someBigInt) > $param0 AS var2 } WITH * @@ -654,10 +654,10 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someBigInt) >= $param0 AS var2 } WITH * @@ -687,10 +687,10 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someBigInt) < $param0 AS var2 } WITH * @@ -720,10 +720,10 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someBigInt) <= $param0 AS var2 } WITH * @@ -753,10 +753,10 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someBigInt) = $param0 AS var2 } WITH * @@ -786,10 +786,10 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someBigInt) > $param0 AS var2 } WITH * @@ -819,10 +819,10 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someBigInt) >= $param0 AS var2 } WITH * @@ -852,10 +852,10 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someBigInt) < $param0 AS var2 } WITH * @@ -885,10 +885,10 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someBigInt) <= $param0 AS var2 } WITH * diff --git a/packages/graphql/tests/tck/aggregations/where/edge/datetime.test.ts b/packages/graphql/tests/tck/aggregations/where/edge/datetime.test.ts index 0dfeafab70..b67f5941dc 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/datetime.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/datetime.test.ts @@ -60,10 +60,10 @@ describe("Cypher Aggregations where edge with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someDateTime) WHERE var2 = $param0) AS var3 } WITH * @@ -99,10 +99,10 @@ describe("Cypher Aggregations where edge with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0._someDateTimeAlias) WHERE var2 = $param0) AS var3 } WITH * @@ -138,10 +138,10 @@ describe("Cypher Aggregations where edge with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someDateTime) WHERE var2 > $param0) AS var3 } WITH * @@ -177,10 +177,10 @@ describe("Cypher Aggregations where edge with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someDateTime) WHERE var2 >= $param0) AS var3 } WITH * @@ -216,10 +216,10 @@ describe("Cypher Aggregations where edge with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someDateTime) WHERE var2 < $param0) AS var3 } WITH * @@ -255,10 +255,10 @@ describe("Cypher Aggregations where edge with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someDateTime) WHERE var2 <= $param0) AS var3 } WITH * @@ -294,10 +294,10 @@ describe("Cypher Aggregations where edge with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someDateTime) = $param0 AS var2 } WITH * @@ -333,10 +333,10 @@ describe("Cypher Aggregations where edge with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someDateTime) > $param0 AS var2 } WITH * @@ -372,10 +372,10 @@ describe("Cypher Aggregations where edge with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someDateTime) >= $param0 AS var2 } WITH * @@ -411,10 +411,10 @@ describe("Cypher Aggregations where edge with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someDateTime) < $param0 AS var2 } WITH * @@ -450,10 +450,10 @@ describe("Cypher Aggregations where edge with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someDateTime) <= $param0 AS var2 } WITH * @@ -489,10 +489,10 @@ describe("Cypher Aggregations where edge with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someDateTime) = $param0 AS var2 } WITH * @@ -528,10 +528,10 @@ describe("Cypher Aggregations where edge with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someDateTime) > $param0 AS var2 } WITH * @@ -567,10 +567,10 @@ describe("Cypher Aggregations where edge with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someDateTime) >= $param0 AS var2 } WITH * @@ -606,10 +606,10 @@ describe("Cypher Aggregations where edge with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someDateTime) < $param0 AS var2 } WITH * @@ -645,10 +645,10 @@ describe("Cypher Aggregations where edge with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someDateTime) <= $param0 AS var2 } WITH * diff --git a/packages/graphql/tests/tck/aggregations/where/edge/duration.test.ts b/packages/graphql/tests/tck/aggregations/where/edge/duration.test.ts index 2a3a8cef3e..239df59515 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/duration.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/duration.test.ts @@ -60,10 +60,10 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someDuration) WHERE (datetime() + var2) = (datetime() + $param0)) AS var3 } WITH * @@ -101,10 +101,10 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0._someDurationAlias) WHERE (datetime() + var2) = (datetime() + $param0)) AS var3 } WITH * @@ -142,10 +142,10 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someDuration) WHERE (datetime() + var2) > (datetime() + $param0)) AS var3 } WITH * @@ -183,10 +183,10 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someDuration) WHERE (datetime() + var2) >= (datetime() + $param0)) AS var3 } WITH * @@ -224,10 +224,10 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someDuration) WHERE (datetime() + var2) < (datetime() + $param0)) AS var3 } WITH * @@ -265,10 +265,10 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someDuration) WHERE (datetime() + var2) <= (datetime() + $param0)) AS var3 } WITH * @@ -306,10 +306,10 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this0.someDuration) = $param0 AS var2 } WITH * @@ -347,10 +347,10 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this0.someDuration) > $param0 AS var2 } WITH * @@ -388,10 +388,10 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this0.someDuration) >= $param0 AS var2 } WITH * @@ -429,10 +429,10 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this0.someDuration) < $param0 AS var2 } WITH * @@ -470,10 +470,10 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this0.someDuration) <= $param0 AS var2 } WITH * @@ -511,10 +511,10 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someDuration) = $param0 AS var2 } WITH * @@ -552,10 +552,10 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someDuration) > $param0 AS var2 } WITH * @@ -593,10 +593,10 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someDuration) >= $param0 AS var2 } WITH * @@ -634,10 +634,10 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someDuration) < $param0 AS var2 } WITH * @@ -675,10 +675,10 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someDuration) <= $param0 AS var2 } WITH * @@ -716,10 +716,10 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someDuration) = $param0 AS var2 } WITH * @@ -757,10 +757,10 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someDuration) > $param0 AS var2 } WITH * @@ -798,10 +798,10 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someDuration) >= $param0 AS var2 } WITH * @@ -839,10 +839,10 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someDuration) < $param0 AS var2 } WITH * @@ -880,10 +880,10 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someDuration) <= $param0 AS var2 } WITH * diff --git a/packages/graphql/tests/tck/aggregations/where/edge/float.test.ts b/packages/graphql/tests/tck/aggregations/where/edge/float.test.ts index 7938804788..64227cd63b 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/float.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/float.test.ts @@ -60,10 +60,10 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someFloat) WHERE var2 = $param0) AS var3 } WITH * @@ -90,10 +90,10 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0._someFloatAlias) WHERE var2 = $param0) AS var3 } WITH * @@ -120,10 +120,10 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someFloat) WHERE var2 > $param0) AS var3 } WITH * @@ -150,10 +150,10 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someFloat) WHERE var2 >= $param0) AS var3 } WITH * @@ -180,10 +180,10 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someFloat) WHERE var2 < $param0) AS var3 } WITH * @@ -210,10 +210,10 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someFloat) WHERE var2 <= $param0) AS var3 } WITH * @@ -240,10 +240,10 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this0.someFloat) = $param0 AS var2 } WITH * @@ -270,10 +270,10 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this0.someFloat) > $param0 AS var2 } WITH * @@ -300,10 +300,10 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this0.someFloat) >= $param0 AS var2 } WITH * @@ -330,10 +330,10 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this0.someFloat) < $param0 AS var2 } WITH * @@ -360,10 +360,10 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this0.someFloat) <= $param0 AS var2 } WITH * @@ -390,10 +390,10 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN sum(this0.someFloat) = $param0 AS var2 } WITH * @@ -420,10 +420,10 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN sum(this0.someFloat) > $param0 AS var2 } WITH * @@ -450,10 +450,10 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN sum(this0.someFloat) >= $param0 AS var2 } WITH * @@ -480,10 +480,10 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN sum(this0.someFloat) < $param0 AS var2 } WITH * @@ -510,10 +510,10 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN sum(this0.someFloat) <= $param0 AS var2 } WITH * @@ -540,10 +540,10 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someFloat) = $param0 AS var2 } WITH * @@ -570,10 +570,10 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someFloat) > $param0 AS var2 } WITH * @@ -600,10 +600,10 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someFloat) >= $param0 AS var2 } WITH * @@ -630,10 +630,10 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someFloat) < $param0 AS var2 } WITH * @@ -660,10 +660,10 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someFloat) <= $param0 AS var2 } WITH * @@ -690,10 +690,10 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someFloat) = $param0 AS var2 } WITH * @@ -720,10 +720,10 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someFloat) > $param0 AS var2 } WITH * @@ -750,10 +750,10 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someFloat) >= $param0 AS var2 } WITH * @@ -780,10 +780,10 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someFloat) < $param0 AS var2 } WITH * @@ -810,10 +810,10 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someFloat) <= $param0 AS var2 } WITH * diff --git a/packages/graphql/tests/tck/aggregations/where/edge/id.test.ts b/packages/graphql/tests/tck/aggregations/where/edge/id.test.ts index 983faa97d2..26bfdd3597 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/id.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/id.test.ts @@ -60,10 +60,10 @@ describe("Cypher Aggregations where edge with ID", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.id) WHERE var2 = $param0) AS var3 } WITH * @@ -90,10 +90,10 @@ describe("Cypher Aggregations where edge with ID", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0._someIdAlias) WHERE var2 = $param0) AS var3 } WITH * diff --git a/packages/graphql/tests/tck/aggregations/where/edge/int.test.ts b/packages/graphql/tests/tck/aggregations/where/edge/int.test.ts index ccf29d042a..0e3d4df8c0 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/int.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/int.test.ts @@ -60,10 +60,10 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someInt) WHERE var2 = $param0) AS var3 } WITH * @@ -93,10 +93,10 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0._someIntAlias) WHERE var2 = $param0) AS var3 } WITH * @@ -126,10 +126,10 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someInt) WHERE var2 > $param0) AS var3 } WITH * @@ -159,10 +159,10 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someInt) WHERE var2 >= $param0) AS var3 } WITH * @@ -192,10 +192,10 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someInt) WHERE var2 < $param0) AS var3 } WITH * @@ -225,10 +225,10 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someInt) WHERE var2 <= $param0) AS var3 } WITH * @@ -258,10 +258,10 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this0.someInt) = $param0 AS var2 } WITH * @@ -288,10 +288,10 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this0.someInt) > $param0 AS var2 } WITH * @@ -318,10 +318,10 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this0.someInt) >= $param0 AS var2 } WITH * @@ -348,10 +348,10 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this0.someInt) < $param0 AS var2 } WITH * @@ -378,10 +378,10 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this0.someInt) <= $param0 AS var2 } WITH * @@ -408,10 +408,10 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN sum(this0.someInt) = $param0 AS var2 } WITH * @@ -441,10 +441,10 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN sum(this0.someInt) > $param0 AS var2 } WITH * @@ -474,10 +474,10 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN sum(this0.someInt) >= $param0 AS var2 } WITH * @@ -507,10 +507,10 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN sum(this0.someInt) < $param0 AS var2 } WITH * @@ -540,10 +540,10 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN sum(this0.someInt) <= $param0 AS var2 } WITH * @@ -573,10 +573,10 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someInt) = $param0 AS var2 } WITH * @@ -606,10 +606,10 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someInt) > $param0 AS var2 } WITH * @@ -639,10 +639,10 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someInt) >= $param0 AS var2 } WITH * @@ -672,10 +672,10 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someInt) < $param0 AS var2 } WITH * @@ -705,10 +705,10 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someInt) <= $param0 AS var2 } WITH * @@ -738,10 +738,10 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someInt) = $param0 AS var2 } WITH * @@ -771,10 +771,10 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someInt) > $param0 AS var2 } WITH * @@ -804,10 +804,10 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someInt) >= $param0 AS var2 } WITH * @@ -837,10 +837,10 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someInt) < $param0 AS var2 } WITH * @@ -870,10 +870,10 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someInt) <= $param0 AS var2 } WITH * diff --git a/packages/graphql/tests/tck/aggregations/where/edge/localdatetime.test.ts b/packages/graphql/tests/tck/aggregations/where/edge/localdatetime.test.ts index 8eb85eae4a..40557c34bb 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/localdatetime.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/localdatetime.test.ts @@ -60,10 +60,10 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someLocalDateTime) WHERE var2 = $param0) AS var3 } WITH * @@ -98,10 +98,10 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0._someLocalDateTimeAlias) WHERE var2 = $param0) AS var3 } WITH * @@ -136,10 +136,10 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someLocalDateTime) WHERE var2 > $param0) AS var3 } WITH * @@ -174,10 +174,10 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someLocalDateTime) WHERE var2 >= $param0) AS var3 } WITH * @@ -212,10 +212,10 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someLocalDateTime) WHERE var2 < $param0) AS var3 } WITH * @@ -250,10 +250,10 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someLocalDateTime) WHERE var2 <= $param0) AS var3 } WITH * @@ -288,10 +288,10 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someLocalDateTime) = $param0 AS var2 } WITH * @@ -326,10 +326,10 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someLocalDateTime) > $param0 AS var2 } WITH * @@ -364,10 +364,10 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someLocalDateTime) >= $param0 AS var2 } WITH * @@ -402,10 +402,10 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someLocalDateTime) < $param0 AS var2 } WITH * @@ -440,10 +440,10 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someLocalDateTime) <= $param0 AS var2 } WITH * @@ -478,10 +478,10 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someLocalDateTime) = $param0 AS var2 } WITH * @@ -516,10 +516,10 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someLocalDateTime) > $param0 AS var2 } WITH * @@ -554,10 +554,10 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someLocalDateTime) >= $param0 AS var2 } WITH * @@ -592,10 +592,10 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someLocalDateTime) < $param0 AS var2 } WITH * @@ -630,10 +630,10 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someLocalDateTime) <= $param0 AS var2 } WITH * diff --git a/packages/graphql/tests/tck/aggregations/where/edge/localtime.test.ts b/packages/graphql/tests/tck/aggregations/where/edge/localtime.test.ts index f471fbe0bd..b464a96f86 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/localtime.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/localtime.test.ts @@ -60,10 +60,10 @@ describe("Cypher Aggregations where edge with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someLocalTime) WHERE var2 = $param0) AS var3 } WITH * @@ -95,10 +95,10 @@ describe("Cypher Aggregations where edge with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0._someLocalTimeAlias) WHERE var2 = $param0) AS var3 } WITH * @@ -130,10 +130,10 @@ describe("Cypher Aggregations where edge with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someLocalTime) WHERE var2 > $param0) AS var3 } WITH * @@ -165,10 +165,10 @@ describe("Cypher Aggregations where edge with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someLocalTime) WHERE var2 >= $param0) AS var3 } WITH * @@ -200,10 +200,10 @@ describe("Cypher Aggregations where edge with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someLocalTime) WHERE var2 < $param0) AS var3 } WITH * @@ -235,10 +235,10 @@ describe("Cypher Aggregations where edge with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someLocalTime) WHERE var2 <= $param0) AS var3 } WITH * @@ -270,10 +270,10 @@ describe("Cypher Aggregations where edge with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someLocalTime) = $param0 AS var2 } WITH * @@ -305,10 +305,10 @@ describe("Cypher Aggregations where edge with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someLocalTime) > $param0 AS var2 } WITH * @@ -340,10 +340,10 @@ describe("Cypher Aggregations where edge with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someLocalTime) >= $param0 AS var2 } WITH * @@ -375,10 +375,10 @@ describe("Cypher Aggregations where edge with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someLocalTime) < $param0 AS var2 } WITH * @@ -410,10 +410,10 @@ describe("Cypher Aggregations where edge with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someLocalTime) <= $param0 AS var2 } WITH * @@ -445,10 +445,10 @@ describe("Cypher Aggregations where edge with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someLocalTime) = $param0 AS var2 } WITH * @@ -480,10 +480,10 @@ describe("Cypher Aggregations where edge with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someLocalTime) > $param0 AS var2 } WITH * @@ -515,10 +515,10 @@ describe("Cypher Aggregations where edge with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someLocalTime) >= $param0 AS var2 } WITH * @@ -550,10 +550,10 @@ describe("Cypher Aggregations where edge with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someLocalTime) < $param0 AS var2 } WITH * @@ -585,10 +585,10 @@ describe("Cypher Aggregations where edge with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someLocalTime) <= $param0 AS var2 } WITH * diff --git a/packages/graphql/tests/tck/aggregations/where/edge/logical.test.ts b/packages/graphql/tests/tck/aggregations/where/edge/logical.test.ts index 9ee2be8c8e..b09491ba03 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/logical.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/logical.test.ts @@ -61,10 +61,10 @@ describe("Cypher Aggregations where edge with Logical AND + OR + NOT", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someFloat) WHERE var2 = $param0) AS var3, any(var4 IN collect(this0.someFloat) WHERE var4 = $param1) AS var5 } WITH * @@ -92,10 +92,10 @@ describe("Cypher Aggregations where edge with Logical AND + OR + NOT", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someFloat) WHERE var2 = $param0) AS var3, any(var4 IN collect(this0.someFloat) WHERE var4 = $param1) AS var5 } WITH * @@ -123,10 +123,10 @@ describe("Cypher Aggregations where edge with Logical AND + OR + NOT", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someFloat) WHERE var2 = $param0) AS var3 } WITH * diff --git a/packages/graphql/tests/tck/aggregations/where/edge/string.test.ts b/packages/graphql/tests/tck/aggregations/where/edge/string.test.ts index 49b6191cd1..e211a1b145 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/string.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/string.test.ts @@ -60,10 +60,10 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someString) WHERE var2 = $param0) AS var3 } WITH * @@ -90,10 +90,10 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0._someStringAlias) WHERE var2 = $param0) AS var3 } WITH * @@ -120,10 +120,10 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(size(this0.someString)) WHERE var2 > $param0) AS var3 } WITH * @@ -153,10 +153,10 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(size(this0.someString)) WHERE var2 >= $param0) AS var3 } WITH * @@ -186,10 +186,10 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(size(this0.someString)) WHERE var2 < $param0) AS var3 } WITH * @@ -219,10 +219,10 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(size(this0.someString)) WHERE var2 <= $param0) AS var3 } WITH * @@ -252,10 +252,10 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(size(this0.someString)) = $param0 AS var2 } WITH * @@ -285,10 +285,10 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(size(this0.someString)) > $param0 AS var2 } WITH * @@ -318,10 +318,10 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(size(this0.someString)) >= $param0 AS var2 } WITH * @@ -351,10 +351,10 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(size(this0.someString)) < $param0 AS var2 } WITH * @@ -384,10 +384,10 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(size(this0.someString)) <= $param0 AS var2 } WITH * @@ -417,10 +417,10 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(size(this0.someString)) = $param0 AS var2 } WITH * @@ -450,10 +450,10 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(size(this0.someString)) > $param0 AS var2 } WITH * @@ -483,10 +483,10 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(size(this0.someString)) >= $param0 AS var2 } WITH * @@ -516,10 +516,10 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(size(this0.someString)) < $param0 AS var2 } WITH * @@ -549,10 +549,10 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(size(this0.someString)) <= $param0 AS var2 } WITH * @@ -582,10 +582,10 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(size(this0.someString)) = $param0 AS var2 } WITH * @@ -612,10 +612,10 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(size(this0.someString)) > $param0 AS var2 } WITH * @@ -642,10 +642,10 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(size(this0.someString)) >= $param0 AS var2 } WITH * @@ -672,10 +672,10 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(size(this0.someString)) < $param0 AS var2 } WITH * @@ -702,10 +702,10 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(size(this0.someString)) <= $param0 AS var2 } WITH * diff --git a/packages/graphql/tests/tck/aggregations/where/edge/time.test.ts b/packages/graphql/tests/tck/aggregations/where/edge/time.test.ts index db8edaab0b..9ec0361a0b 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/time.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/time.test.ts @@ -60,10 +60,10 @@ describe("Cypher Aggregations where edge with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someTime) WHERE var2 = $param0) AS var3 } WITH * @@ -96,10 +96,10 @@ describe("Cypher Aggregations where edge with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0._someTimeAlias) WHERE var2 = $param0) AS var3 } WITH * @@ -132,10 +132,10 @@ describe("Cypher Aggregations where edge with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someTime) WHERE var2 > $param0) AS var3 } WITH * @@ -168,10 +168,10 @@ describe("Cypher Aggregations where edge with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someTime) WHERE var2 >= $param0) AS var3 } WITH * @@ -204,10 +204,10 @@ describe("Cypher Aggregations where edge with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someTime) WHERE var2 < $param0) AS var3 } WITH * @@ -240,10 +240,10 @@ describe("Cypher Aggregations where edge with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this0.someTime) WHERE var2 <= $param0) AS var3 } WITH * @@ -276,10 +276,10 @@ describe("Cypher Aggregations where edge with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someTime) = $param0 AS var2 } WITH * @@ -312,10 +312,10 @@ describe("Cypher Aggregations where edge with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someTime) > $param0 AS var2 } WITH * @@ -348,10 +348,10 @@ describe("Cypher Aggregations where edge with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someTime) >= $param0 AS var2 } WITH * @@ -384,10 +384,10 @@ describe("Cypher Aggregations where edge with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someTime) < $param0 AS var2 } WITH * @@ -420,10 +420,10 @@ describe("Cypher Aggregations where edge with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this0.someTime) <= $param0 AS var2 } WITH * @@ -456,10 +456,10 @@ describe("Cypher Aggregations where edge with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someTime) = $param0 AS var2 } WITH * @@ -492,10 +492,10 @@ describe("Cypher Aggregations where edge with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someTime) > $param0 AS var2 } WITH * @@ -528,10 +528,10 @@ describe("Cypher Aggregations where edge with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someTime) >= $param0 AS var2 } WITH * @@ -564,10 +564,10 @@ describe("Cypher Aggregations where edge with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someTime) < $param0 AS var2 } WITH * @@ -600,10 +600,10 @@ describe("Cypher Aggregations where edge with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this0.someTime) <= $param0 AS var2 } WITH * diff --git a/packages/graphql/tests/tck/aggregations/where/logical.test.ts b/packages/graphql/tests/tck/aggregations/where/logical.test.ts index 16378ff99c..4610901c60 100644 --- a/packages/graphql/tests/tck/aggregations/where/logical.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/logical.test.ts @@ -55,10 +55,10 @@ describe("Cypher Aggregations where with logical AND plus OR", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN count(this1) > $param0 AS var2, count(this1) < $param1 AS var3 } WITH * @@ -92,10 +92,10 @@ describe("Cypher Aggregations where with logical AND plus OR", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN count(this1) > $param0 AS var2, count(this1) < $param1 AS var3 } WITH * @@ -129,10 +129,10 @@ describe("Cypher Aggregations where with logical AND plus OR", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN count(this1) > $param0 AS var2 } WITH * @@ -169,10 +169,10 @@ describe("Cypher Aggregations where with logical AND plus OR", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN count(this1) > $param0 AS var2, count(this1) < $param1 AS var3, count(this1) > $param2 AS var4, count(this1) < $param3 AS var5 } WITH * diff --git a/packages/graphql/tests/tck/aggregations/where/node.test.ts b/packages/graphql/tests/tck/aggregations/where/node.test.ts index 58d2737067..7e3a34568e 100644 --- a/packages/graphql/tests/tck/aggregations/where/node.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/node.test.ts @@ -55,10 +55,10 @@ describe("Cypher Where Aggregations with @node directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`_Post\`:\`additionalPost\`) + "MATCH (this:_Post:additionalPost) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`_User\`:\`additionalUser\`) + MATCH (this)<-[this0:LIKES]-(this1:_User:additionalUser) RETURN any(var2 IN collect(size(this1.someName)) WHERE var2 > $param0) AS var3 } WITH * diff --git a/packages/graphql/tests/tck/aggregations/where/node/bigint.test.ts b/packages/graphql/tests/tck/aggregations/where/node/bigint.test.ts index 2a46ed6bdc..58c0457e7c 100644 --- a/packages/graphql/tests/tck/aggregations/where/node/bigint.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/node/bigint.test.ts @@ -56,10 +56,10 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someBigInt) WHERE var2 = $param0) AS var3 } WITH * @@ -89,10 +89,10 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1._someBigIntAlias) WHERE var2 = $param0) AS var3 } WITH * @@ -122,10 +122,10 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someBigInt) WHERE var2 > $param0) AS var3 } WITH * @@ -155,10 +155,10 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someBigInt) WHERE var2 >= $param0) AS var3 } WITH * @@ -188,10 +188,10 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someBigInt) WHERE var2 < $param0) AS var3 } WITH * @@ -221,10 +221,10 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someBigInt) WHERE var2 <= $param0) AS var3 } WITH * @@ -254,10 +254,10 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this1.someBigInt) = $param0 AS var2 } WITH * @@ -287,10 +287,10 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this1.someBigInt) > $param0 AS var2 } WITH * @@ -320,10 +320,10 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this1.someBigInt) >= $param0 AS var2 } WITH * @@ -353,10 +353,10 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this1.someBigInt) < $param0 AS var2 } WITH * @@ -386,10 +386,10 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this1.someBigInt) <= $param0 AS var2 } WITH * @@ -419,10 +419,10 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN sum(this1.someBigInt) = $param0 AS var2 } WITH * @@ -452,10 +452,10 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN sum(this1.someBigInt) > $param0 AS var2 } WITH * @@ -485,10 +485,10 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN sum(this1.someBigInt) >= $param0 AS var2 } WITH * @@ -518,10 +518,10 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN sum(this1.someBigInt) < $param0 AS var2 } WITH * @@ -551,10 +551,10 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN sum(this1.someBigInt) <= $param0 AS var2 } WITH * @@ -584,10 +584,10 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someBigInt) = $param0 AS var2 } WITH * @@ -617,10 +617,10 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someBigInt) > $param0 AS var2 } WITH * @@ -650,10 +650,10 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someBigInt) >= $param0 AS var2 } WITH * @@ -683,10 +683,10 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someBigInt) < $param0 AS var2 } WITH * @@ -716,10 +716,10 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someBigInt) <= $param0 AS var2 } WITH * @@ -749,10 +749,10 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someBigInt) = $param0 AS var2 } WITH * @@ -782,10 +782,10 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someBigInt) > $param0 AS var2 } WITH * @@ -815,10 +815,10 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someBigInt) >= $param0 AS var2 } WITH * @@ -848,10 +848,10 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someBigInt) < $param0 AS var2 } WITH * @@ -881,10 +881,10 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someBigInt) <= $param0 AS var2 } WITH * diff --git a/packages/graphql/tests/tck/aggregations/where/node/datetime.test.ts b/packages/graphql/tests/tck/aggregations/where/node/datetime.test.ts index ae873e759b..5bdd056720 100644 --- a/packages/graphql/tests/tck/aggregations/where/node/datetime.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/node/datetime.test.ts @@ -56,10 +56,10 @@ describe("Cypher Aggregations where node with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someDateTime) WHERE var2 = $param0) AS var3 } WITH * @@ -95,10 +95,10 @@ describe("Cypher Aggregations where node with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1._someDateTimeAlias) WHERE var2 = $param0) AS var3 } WITH * @@ -134,10 +134,10 @@ describe("Cypher Aggregations where node with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someDateTime) WHERE var2 > $param0) AS var3 } WITH * @@ -173,10 +173,10 @@ describe("Cypher Aggregations where node with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someDateTime) WHERE var2 >= $param0) AS var3 } WITH * @@ -212,10 +212,10 @@ describe("Cypher Aggregations where node with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someDateTime) WHERE var2 < $param0) AS var3 } WITH * @@ -251,10 +251,10 @@ describe("Cypher Aggregations where node with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someDateTime) WHERE var2 <= $param0) AS var3 } WITH * @@ -290,10 +290,10 @@ describe("Cypher Aggregations where node with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someDateTime) = $param0 AS var2 } WITH * @@ -329,10 +329,10 @@ describe("Cypher Aggregations where node with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someDateTime) > $param0 AS var2 } WITH * @@ -368,10 +368,10 @@ describe("Cypher Aggregations where node with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someDateTime) >= $param0 AS var2 } WITH * @@ -407,10 +407,10 @@ describe("Cypher Aggregations where node with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someDateTime) < $param0 AS var2 } WITH * @@ -446,10 +446,10 @@ describe("Cypher Aggregations where node with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someDateTime) <= $param0 AS var2 } WITH * @@ -485,10 +485,10 @@ describe("Cypher Aggregations where node with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someDateTime) = $param0 AS var2 } WITH * @@ -524,10 +524,10 @@ describe("Cypher Aggregations where node with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someDateTime) > $param0 AS var2 } WITH * @@ -563,10 +563,10 @@ describe("Cypher Aggregations where node with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someDateTime) >= $param0 AS var2 } WITH * @@ -602,10 +602,10 @@ describe("Cypher Aggregations where node with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someDateTime) < $param0 AS var2 } WITH * @@ -641,10 +641,10 @@ describe("Cypher Aggregations where node with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someDateTime) <= $param0 AS var2 } WITH * diff --git a/packages/graphql/tests/tck/aggregations/where/node/duration.test.ts b/packages/graphql/tests/tck/aggregations/where/node/duration.test.ts index f0767c76e7..1b405554f7 100644 --- a/packages/graphql/tests/tck/aggregations/where/node/duration.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/node/duration.test.ts @@ -56,10 +56,10 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someDuration) WHERE (datetime() + var2) = (datetime() + $param0)) AS var3 } WITH * @@ -97,10 +97,10 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1._someDurationAlias) WHERE (datetime() + var2) = (datetime() + $param0)) AS var3 } WITH * @@ -138,10 +138,10 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someDuration) WHERE (datetime() + var2) > (datetime() + $param0)) AS var3 } WITH * @@ -179,10 +179,10 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someDuration) WHERE (datetime() + var2) >= (datetime() + $param0)) AS var3 } WITH * @@ -220,10 +220,10 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someDuration) WHERE (datetime() + var2) < (datetime() + $param0)) AS var3 } WITH * @@ -261,10 +261,10 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someDuration) WHERE (datetime() + var2) <= (datetime() + $param0)) AS var3 } WITH * @@ -302,10 +302,10 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this1.someDuration) = $param0 AS var2 } WITH * @@ -343,10 +343,10 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this1.someDuration) > $param0 AS var2 } WITH * @@ -384,10 +384,10 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this1.someDuration) >= $param0 AS var2 } WITH * @@ -425,10 +425,10 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this1.someDuration) < $param0 AS var2 } WITH * @@ -466,10 +466,10 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this1.someDuration) <= $param0 AS var2 } WITH * @@ -507,10 +507,10 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someDuration) = $param0 AS var2 } WITH * @@ -548,10 +548,10 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someDuration) > $param0 AS var2 } WITH * @@ -589,10 +589,10 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someDuration) >= $param0 AS var2 } WITH * @@ -630,10 +630,10 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someDuration) < $param0 AS var2 } WITH * @@ -671,10 +671,10 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someDuration) <= $param0 AS var2 } WITH * @@ -712,10 +712,10 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someDuration) = $param0 AS var2 } WITH * @@ -753,10 +753,10 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someDuration) > $param0 AS var2 } WITH * @@ -794,10 +794,10 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someDuration) >= $param0 AS var2 } WITH * @@ -835,10 +835,10 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someDuration) < $param0 AS var2 } WITH * @@ -876,10 +876,10 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someDuration) <= $param0 AS var2 } WITH * diff --git a/packages/graphql/tests/tck/aggregations/where/node/float.test.ts b/packages/graphql/tests/tck/aggregations/where/node/float.test.ts index e37d6ef78e..b88dd291db 100644 --- a/packages/graphql/tests/tck/aggregations/where/node/float.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/node/float.test.ts @@ -56,10 +56,10 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someFloat) WHERE var2 = $param0) AS var3 } WITH * @@ -86,10 +86,10 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1._someFloatAlias) WHERE var2 = $param0) AS var3 } WITH * @@ -116,10 +116,10 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someFloat) WHERE var2 > $param0) AS var3 } WITH * @@ -146,10 +146,10 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someFloat) WHERE var2 >= $param0) AS var3 } WITH * @@ -176,10 +176,10 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someFloat) WHERE var2 < $param0) AS var3 } WITH * @@ -206,10 +206,10 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someFloat) WHERE var2 <= $param0) AS var3 } WITH * @@ -236,10 +236,10 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this1.someFloat) = $param0 AS var2 } WITH * @@ -266,10 +266,10 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this1.someFloat) > $param0 AS var2 } WITH * @@ -296,10 +296,10 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this1.someFloat) >= $param0 AS var2 } WITH * @@ -326,10 +326,10 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this1.someFloat) < $param0 AS var2 } WITH * @@ -356,10 +356,10 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this1.someFloat) <= $param0 AS var2 } WITH * @@ -386,10 +386,10 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN sum(this1.someFloat) = $param0 AS var2 } WITH * @@ -416,10 +416,10 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN sum(this1.someFloat) > $param0 AS var2 } WITH * @@ -446,10 +446,10 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN sum(this1.someFloat) >= $param0 AS var2 } WITH * @@ -476,10 +476,10 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN sum(this1.someFloat) < $param0 AS var2 } WITH * @@ -506,10 +506,10 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN sum(this1.someFloat) <= $param0 AS var2 } WITH * @@ -536,10 +536,10 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someFloat) = $param0 AS var2 } WITH * @@ -566,10 +566,10 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someFloat) > $param0 AS var2 } WITH * @@ -596,10 +596,10 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someFloat) >= $param0 AS var2 } WITH * @@ -626,10 +626,10 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someFloat) < $param0 AS var2 } WITH * @@ -656,10 +656,10 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someFloat) <= $param0 AS var2 } WITH * @@ -686,10 +686,10 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someFloat) = $param0 AS var2 } WITH * @@ -716,10 +716,10 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someFloat) > $param0 AS var2 } WITH * @@ -746,10 +746,10 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someFloat) >= $param0 AS var2 } WITH * @@ -776,10 +776,10 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someFloat) < $param0 AS var2 } WITH * @@ -806,10 +806,10 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someFloat) <= $param0 AS var2 } WITH * diff --git a/packages/graphql/tests/tck/aggregations/where/node/id.test.ts b/packages/graphql/tests/tck/aggregations/where/node/id.test.ts index 8db7584173..d15096af09 100644 --- a/packages/graphql/tests/tck/aggregations/where/node/id.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/node/id.test.ts @@ -57,10 +57,10 @@ describe("Cypher Aggregations where node with ID", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.id) WHERE var2 = $param0) AS var3 } WITH * @@ -87,10 +87,10 @@ describe("Cypher Aggregations where node with ID", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1._someIdAlias) WHERE var2 = $param0) AS var3 } WITH * diff --git a/packages/graphql/tests/tck/aggregations/where/node/int.test.ts b/packages/graphql/tests/tck/aggregations/where/node/int.test.ts index fff084a77d..d7c894e733 100644 --- a/packages/graphql/tests/tck/aggregations/where/node/int.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/node/int.test.ts @@ -56,10 +56,10 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someInt) WHERE var2 = $param0) AS var3 } WITH * @@ -89,10 +89,10 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1._someIntAlias) WHERE var2 = $param0) AS var3 } WITH * @@ -122,10 +122,10 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someInt) WHERE var2 > $param0) AS var3 } WITH * @@ -155,10 +155,10 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someInt) WHERE var2 >= $param0) AS var3 } WITH * @@ -188,10 +188,10 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someInt) WHERE var2 < $param0) AS var3 } WITH * @@ -221,10 +221,10 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someInt) WHERE var2 <= $param0) AS var3 } WITH * @@ -254,10 +254,10 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this1.someInt) = $param0 AS var2 } WITH * @@ -284,10 +284,10 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this1.someInt) > $param0 AS var2 } WITH * @@ -314,10 +314,10 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this1.someInt) >= $param0 AS var2 } WITH * @@ -344,10 +344,10 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this1.someInt) < $param0 AS var2 } WITH * @@ -374,10 +374,10 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(this1.someInt) <= $param0 AS var2 } WITH * @@ -404,10 +404,10 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN sum(this1.someInt) = $param0 AS var2 } WITH * @@ -437,10 +437,10 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN sum(this1.someInt) > $param0 AS var2 } WITH * @@ -470,10 +470,10 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN sum(this1.someInt) >= $param0 AS var2 } WITH * @@ -503,10 +503,10 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN sum(this1.someInt) < $param0 AS var2 } WITH * @@ -536,10 +536,10 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN sum(this1.someInt) <= $param0 AS var2 } WITH * @@ -569,10 +569,10 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someInt) = $param0 AS var2 } WITH * @@ -602,10 +602,10 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someInt) > $param0 AS var2 } WITH * @@ -635,10 +635,10 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someInt) >= $param0 AS var2 } WITH * @@ -668,10 +668,10 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someInt) < $param0 AS var2 } WITH * @@ -701,10 +701,10 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someInt) <= $param0 AS var2 } WITH * @@ -734,10 +734,10 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someInt) = $param0 AS var2 } WITH * @@ -767,10 +767,10 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someInt) > $param0 AS var2 } WITH * @@ -800,10 +800,10 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someInt) >= $param0 AS var2 } WITH * @@ -833,10 +833,10 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someInt) < $param0 AS var2 } WITH * @@ -866,10 +866,10 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someInt) <= $param0 AS var2 } WITH * diff --git a/packages/graphql/tests/tck/aggregations/where/node/localdatetime.test.ts b/packages/graphql/tests/tck/aggregations/where/node/localdatetime.test.ts index 11d301d659..67b606691b 100644 --- a/packages/graphql/tests/tck/aggregations/where/node/localdatetime.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/node/localdatetime.test.ts @@ -56,10 +56,10 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someLocalDateTime) WHERE var2 = $param0) AS var3 } WITH * @@ -94,10 +94,10 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1._someLocalDateTimeAlias) WHERE var2 = $param0) AS var3 } WITH * @@ -132,10 +132,10 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someLocalDateTime) WHERE var2 > $param0) AS var3 } WITH * @@ -170,10 +170,10 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someLocalDateTime) WHERE var2 >= $param0) AS var3 } WITH * @@ -208,10 +208,10 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someLocalDateTime) WHERE var2 < $param0) AS var3 } WITH * @@ -246,10 +246,10 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someLocalDateTime) WHERE var2 <= $param0) AS var3 } WITH * @@ -284,10 +284,10 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someLocalDateTime) = $param0 AS var2 } WITH * @@ -322,10 +322,10 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someLocalDateTime) > $param0 AS var2 } WITH * @@ -360,10 +360,10 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someLocalDateTime) >= $param0 AS var2 } WITH * @@ -398,10 +398,10 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someLocalDateTime) < $param0 AS var2 } WITH * @@ -436,10 +436,10 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someLocalDateTime) <= $param0 AS var2 } WITH * @@ -474,10 +474,10 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someLocalDateTime) = $param0 AS var2 } WITH * @@ -512,10 +512,10 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someLocalDateTime) > $param0 AS var2 } WITH * @@ -550,10 +550,10 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someLocalDateTime) >= $param0 AS var2 } WITH * @@ -588,10 +588,10 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someLocalDateTime) < $param0 AS var2 } WITH * @@ -626,10 +626,10 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someLocalDateTime) <= $param0 AS var2 } WITH * diff --git a/packages/graphql/tests/tck/aggregations/where/node/localtime.test.ts b/packages/graphql/tests/tck/aggregations/where/node/localtime.test.ts index 677b673aab..65cc354123 100644 --- a/packages/graphql/tests/tck/aggregations/where/node/localtime.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/node/localtime.test.ts @@ -56,10 +56,10 @@ describe("Cypher Aggregations where node with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someLocalTime) WHERE var2 = $param0) AS var3 } WITH * @@ -91,10 +91,10 @@ describe("Cypher Aggregations where node with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1._someLocalTimeAlias) WHERE var2 = $param0) AS var3 } WITH * @@ -126,10 +126,10 @@ describe("Cypher Aggregations where node with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someLocalTime) WHERE var2 > $param0) AS var3 } WITH * @@ -161,10 +161,10 @@ describe("Cypher Aggregations where node with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someLocalTime) WHERE var2 >= $param0) AS var3 } WITH * @@ -196,10 +196,10 @@ describe("Cypher Aggregations where node with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someLocalTime) WHERE var2 < $param0) AS var3 } WITH * @@ -231,10 +231,10 @@ describe("Cypher Aggregations where node with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someLocalTime) WHERE var2 <= $param0) AS var3 } WITH * @@ -266,10 +266,10 @@ describe("Cypher Aggregations where node with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someLocalTime) = $param0 AS var2 } WITH * @@ -301,10 +301,10 @@ describe("Cypher Aggregations where node with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someLocalTime) > $param0 AS var2 } WITH * @@ -336,10 +336,10 @@ describe("Cypher Aggregations where node with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someLocalTime) >= $param0 AS var2 } WITH * @@ -371,10 +371,10 @@ describe("Cypher Aggregations where node with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someLocalTime) < $param0 AS var2 } WITH * @@ -406,10 +406,10 @@ describe("Cypher Aggregations where node with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someLocalTime) <= $param0 AS var2 } WITH * @@ -441,10 +441,10 @@ describe("Cypher Aggregations where node with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someLocalTime) = $param0 AS var2 } WITH * @@ -476,10 +476,10 @@ describe("Cypher Aggregations where node with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someLocalTime) > $param0 AS var2 } WITH * @@ -511,10 +511,10 @@ describe("Cypher Aggregations where node with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someLocalTime) >= $param0 AS var2 } WITH * @@ -546,10 +546,10 @@ describe("Cypher Aggregations where node with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someLocalTime) < $param0 AS var2 } WITH * @@ -581,10 +581,10 @@ describe("Cypher Aggregations where node with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someLocalTime) <= $param0 AS var2 } WITH * diff --git a/packages/graphql/tests/tck/aggregations/where/node/logical.test.ts b/packages/graphql/tests/tck/aggregations/where/node/logical.test.ts index 4efca9df11..b90b3c8038 100644 --- a/packages/graphql/tests/tck/aggregations/where/node/logical.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/node/logical.test.ts @@ -57,10 +57,10 @@ describe("Cypher Aggregations where node with Logical AND + OR", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someFloat) WHERE var2 = $param0) AS var3, any(var4 IN collect(this1.someFloat) WHERE var4 = $param1) AS var5 } WITH * @@ -88,10 +88,10 @@ describe("Cypher Aggregations where node with Logical AND + OR", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someFloat) WHERE var2 = $param0) AS var3, any(var4 IN collect(this1.someFloat) WHERE var4 = $param1) AS var5 } WITH * @@ -119,10 +119,10 @@ describe("Cypher Aggregations where node with Logical AND + OR", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someFloat) WHERE var2 = $param0) AS var3 } WITH * diff --git a/packages/graphql/tests/tck/aggregations/where/node/string.test.ts b/packages/graphql/tests/tck/aggregations/where/node/string.test.ts index 4334beb887..666a832e86 100644 --- a/packages/graphql/tests/tck/aggregations/where/node/string.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/node/string.test.ts @@ -56,10 +56,10 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.name) WHERE var2 = $param0) AS var3 } WITH * @@ -86,10 +86,10 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1._someStringAlias) WHERE var2 = $param0) AS var3 } WITH * @@ -116,10 +116,10 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(size(this1.name)) WHERE var2 > $param0) AS var3 } WITH * @@ -149,10 +149,10 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(size(this1.name)) WHERE var2 >= $param0) AS var3 } WITH * @@ -182,10 +182,10 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(size(this1.name)) WHERE var2 < $param0) AS var3 } WITH * @@ -215,10 +215,10 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(size(this1.name)) WHERE var2 <= $param0) AS var3 } WITH * @@ -248,10 +248,10 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(size(this1.name)) = $param0 AS var2 } WITH * @@ -281,10 +281,10 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(size(this1.name)) > $param0 AS var2 } WITH * @@ -314,10 +314,10 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(size(this1.name)) >= $param0 AS var2 } WITH * @@ -347,10 +347,10 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(size(this1.name)) < $param0 AS var2 } WITH * @@ -380,10 +380,10 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(size(this1.name)) <= $param0 AS var2 } WITH * @@ -413,10 +413,10 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(size(this1.name)) = $param0 AS var2 } WITH * @@ -446,10 +446,10 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(size(this1.name)) > $param0 AS var2 } WITH * @@ -479,10 +479,10 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(size(this1.name)) >= $param0 AS var2 } WITH * @@ -512,10 +512,10 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(size(this1.name)) < $param0 AS var2 } WITH * @@ -545,10 +545,10 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(size(this1.name)) <= $param0 AS var2 } WITH * @@ -578,10 +578,10 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(size(this1.name)) = $param0 AS var2 } WITH * @@ -608,10 +608,10 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(size(this1.name)) > $param0 AS var2 } WITH * @@ -638,10 +638,10 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(size(this1.name)) >= $param0 AS var2 } WITH * @@ -668,10 +668,10 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(size(this1.name)) < $param0 AS var2 } WITH * @@ -698,10 +698,10 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN avg(size(this1.name)) <= $param0 AS var2 } WITH * diff --git a/packages/graphql/tests/tck/aggregations/where/node/time.test.ts b/packages/graphql/tests/tck/aggregations/where/node/time.test.ts index 0312138fe6..199fb8741a 100644 --- a/packages/graphql/tests/tck/aggregations/where/node/time.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/node/time.test.ts @@ -56,10 +56,10 @@ describe("Cypher Aggregations where node with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someTime) WHERE var2 = $param0) AS var3 } WITH * @@ -92,10 +92,10 @@ describe("Cypher Aggregations where node with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1._someTimeAlias) WHERE var2 = $param0) AS var3 } WITH * @@ -128,10 +128,10 @@ describe("Cypher Aggregations where node with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someTime) WHERE var2 > $param0) AS var3 } WITH * @@ -164,10 +164,10 @@ describe("Cypher Aggregations where node with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someTime) WHERE var2 >= $param0) AS var3 } WITH * @@ -200,10 +200,10 @@ describe("Cypher Aggregations where node with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someTime) WHERE var2 < $param0) AS var3 } WITH * @@ -236,10 +236,10 @@ describe("Cypher Aggregations where node with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN any(var2 IN collect(this1.someTime) WHERE var2 <= $param0) AS var3 } WITH * @@ -272,10 +272,10 @@ describe("Cypher Aggregations where node with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someTime) = $param0 AS var2 } WITH * @@ -308,10 +308,10 @@ describe("Cypher Aggregations where node with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someTime) > $param0 AS var2 } WITH * @@ -344,10 +344,10 @@ describe("Cypher Aggregations where node with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someTime) >= $param0 AS var2 } WITH * @@ -380,10 +380,10 @@ describe("Cypher Aggregations where node with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someTime) < $param0 AS var2 } WITH * @@ -416,10 +416,10 @@ describe("Cypher Aggregations where node with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN min(this1.someTime) <= $param0 AS var2 } WITH * @@ -452,10 +452,10 @@ describe("Cypher Aggregations where node with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someTime) = $param0 AS var2 } WITH * @@ -488,10 +488,10 @@ describe("Cypher Aggregations where node with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someTime) > $param0 AS var2 } WITH * @@ -524,10 +524,10 @@ describe("Cypher Aggregations where node with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someTime) >= $param0 AS var2 } WITH * @@ -560,10 +560,10 @@ describe("Cypher Aggregations where node with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someTime) < $param0 AS var2 } WITH * @@ -596,10 +596,10 @@ describe("Cypher Aggregations where node with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) CALL { WITH this - MATCH (this)<-[this0:\`LIKES\`]-(this1:\`User\`) + MATCH (this)<-[this0:LIKES]-(this1:User) RETURN max(this1.someTime) <= $param0 AS var2 } WITH * diff --git a/packages/graphql/tests/tck/alias.test.ts b/packages/graphql/tests/tck/alias.test.ts index 15e39165b6..2c7e85c32e 100644 --- a/packages/graphql/tests/tck/alias.test.ts +++ b/packages/graphql/tests/tck/alias.test.ts @@ -71,10 +71,10 @@ describe("Cypher Alias", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WITH this1 { aliasActorsName: this1.name } AS this1 RETURN collect(this1) AS var2 } diff --git a/packages/graphql/tests/tck/array-methods.test.ts b/packages/graphql/tests/tck/array-methods.test.ts index cafe8231af..2c80f8e9e1 100644 --- a/packages/graphql/tests/tck/array-methods.test.ts +++ b/packages/graphql/tests/tck/array-methods.test.ts @@ -49,7 +49,7 @@ describe("Arrays Methods", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL apoc.util.validate(this.ratings IS NULL, \\"Property %s cannot be NULL\\", ['ratings']) SET this.ratings = this.ratings + $this_update_ratings_PUSH RETURN collect(DISTINCT this { .title, .ratings }) AS data" @@ -93,7 +93,7 @@ describe("Arrays Methods", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL apoc.util.validate(this.ratings IS NULL OR this.scores IS NULL, \\"Properties %s, %s cannot be NULL\\", ['ratings', 'scores']) SET this.ratings = this.ratings + $this_update_ratings_PUSH SET this.scores = this.scores + $this_update_scores_PUSH @@ -151,7 +151,7 @@ describe("Arrays Methods", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL apoc.util.validate(this.filmingLocations IS NULL, \\"Property %s cannot be NULL\\", ['filmingLocations']) SET this.filmingLocations = this.filmingLocations + [p in $this_update_filmingLocations_PUSH | point(p)] RETURN collect(DISTINCT this { .title, filmingLocations: CASE @@ -208,7 +208,7 @@ describe("Arrays Methods", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WITH this WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $authorization_param1 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL apoc.util.validate(this.ratings IS NULL, \\"Property %s cannot be NULL\\", ['ratings']) @@ -259,7 +259,7 @@ describe("Arrays Methods", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL apoc.util.validate(this.ratings IS NULL, \\"Property %s cannot be NULL\\", ['ratings']) SET this.ratings = this.ratings[0..-$this_update_ratings_POP] RETURN collect(DISTINCT this { .title, .ratings }) AS data" @@ -304,7 +304,7 @@ describe("Arrays Methods", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL apoc.util.validate(this.ratings IS NULL OR this.scores IS NULL, \\"Properties %s, %s cannot be NULL\\", ['ratings', 'scores']) SET this.ratings = this.ratings[0..-$this_update_ratings_POP] SET this.scores = this.scores[0..-$this_update_scores_POP] @@ -360,7 +360,7 @@ describe("Arrays Methods", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WITH this WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $authorization_param1 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL apoc.util.validate(this.ratings IS NULL, \\"Property %s cannot be NULL\\", ['ratings']) @@ -414,7 +414,7 @@ describe("Arrays Methods", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL apoc.util.validate(this.ratings IS NULL OR this.scores IS NULL, \\"Properties %s, %s cannot be NULL\\", ['ratings', 'scores']) SET this.ratings = this.ratings + $this_update_ratings_PUSH SET this.scores = this.scores[0..-$this_update_scores_POP] @@ -478,25 +478,25 @@ describe("Arrays Methods", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WHERE this.id = $param0 WITH this CALL { WITH this - MATCH (this)-[this_acted_in0_relationship:\`ACTED_IN\`]->(this_actedIn0:Movie) + MATCH (this)-[this_acted_in0_relationship:ACTED_IN]->(this_actedIn0:Movie) SET this_acted_in0_relationship.pay = this_acted_in0_relationship.pay + $updateActors.args.update.actedIn[0].update.edge.pay_PUSH RETURN count(*) AS update_this_actedIn0 } WITH * CALL { WITH this - MATCH (this)-[update_this0:\`ACTED_IN\`]->(update_this1:\`Movie\`) + MATCH (this)-[update_this0:ACTED_IN]->(update_this1:Movie) WITH update_this1 { .title } AS update_this1 RETURN collect(update_this1) AS update_var2 } CALL { WITH this - MATCH (this)-[update_this3:\`ACTED_IN\`]->(update_this4:\`Movie\`) + MATCH (this)-[update_this3:ACTED_IN]->(update_this4:Movie) WITH { pay: update_this3.pay } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount @@ -573,25 +573,25 @@ describe("Arrays Methods", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WHERE this.id = $param0 WITH this CALL { WITH this - MATCH (this)-[this_acted_in0_relationship:\`ACTED_IN\`]->(this_actedIn0:Movie) + MATCH (this)-[this_acted_in0_relationship:ACTED_IN]->(this_actedIn0:Movie) SET this_acted_in0_relationship.pay = this_acted_in0_relationship.pay[0..-$updateActors.args.update.actedIn[0].update.edge.pay_POP] RETURN count(*) AS update_this_actedIn0 } WITH * CALL { WITH this - MATCH (this)-[update_this0:\`ACTED_IN\`]->(update_this1:\`Movie\`) + MATCH (this)-[update_this0:ACTED_IN]->(update_this1:Movie) WITH update_this1 { .title } AS update_this1 RETURN collect(update_this1) AS update_var2 } CALL { WITH this - MATCH (this)-[update_this3:\`ACTED_IN\`]->(update_this4:\`Movie\`) + MATCH (this)-[update_this3:ACTED_IN]->(update_this4:Movie) WITH { pay: update_this3.pay } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount diff --git a/packages/graphql/tests/tck/arrays.test.ts b/packages/graphql/tests/tck/arrays.test.ts index 5cc0736ed0..89123c9775 100644 --- a/packages/graphql/tests/tck/arrays.test.ts +++ b/packages/graphql/tests/tck/arrays.test.ts @@ -52,7 +52,7 @@ describe("Cypher Arrays", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE $param0 IN this.ratings RETURN this { .title, .ratings } AS this" `); @@ -77,7 +77,7 @@ describe("Cypher Arrays", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE NOT ($param0 IN this.ratings) RETURN this { .title, .ratings } AS this" `); diff --git a/packages/graphql/tests/tck/connections/alias.test.ts b/packages/graphql/tests/tck/connections/alias.test.ts index d044bef1da..156d7f1a41 100644 --- a/packages/graphql/tests/tck/connections/alias.test.ts +++ b/packages/graphql/tests/tck/connections/alias.test.ts @@ -62,10 +62,10 @@ describe("Connections Alias", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WITH { node: { __resolveType: \\"Actor\\", __id: id(this1) } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount @@ -105,11 +105,11 @@ describe("Connections Alias", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE this1.name = $param1 WITH { screenTime: this0.screenTime, node: { name: this1.name } } AS edge WITH collect(edge) AS edges @@ -118,7 +118,7 @@ describe("Connections Alias", () => { } CALL { WITH this - MATCH (this)<-[this3:\`ACTED_IN\`]-(this4:\`Actor\`) + MATCH (this)<-[this3:ACTED_IN]-(this4:Actor) WHERE this4.name = $param2 WITH { screenTime: this3.screenTime, node: { name: this4.name } } AS edge WITH collect(edge) AS edges diff --git a/packages/graphql/tests/tck/connections/connect-or-create/connect-or-create-alias.test.ts b/packages/graphql/tests/tck/connections/connect-or-create/connect-or-create-alias.test.ts index 038dc90979..5f35f8794c 100644 --- a/packages/graphql/tests/tck/connections/connect-or-create/connect-or-create-alias.test.ts +++ b/packages/graphql/tests/tck/connections/connect-or-create/connect-or-create-alias.test.ts @@ -83,33 +83,33 @@ describe("Connect or create with @alias", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`BibliographicReference\`:\`Resource\`) + "MATCH (this:BibliographicReference:Resource) WHERE this._uri = $param0 SET this.prefLabel = $this_update_prefLabel WITH this CALL { WITH this - MERGE (this_isInPublication0_connectOrCreate0:\`Concept\`:\`Resource\` { \`$_uri\`: $this_isInPublication0_connectOrCreate_param0 }) + MERGE (this_isInPublication0_connectOrCreate0:Concept:Resource { \`$_uri\`: $this_isInPublication0_connectOrCreate_param0 }) ON CREATE SET this_isInPublication0_connectOrCreate0.\`$_uri\` = $this_isInPublication0_connectOrCreate_param1, this_isInPublication0_connectOrCreate0.prefLabel = $this_isInPublication0_connectOrCreate_param2 - MERGE (this)-[this_isInPublication0_connectOrCreate_this0:\`isInPublication\`]->(this_isInPublication0_connectOrCreate0) + MERGE (this)-[this_isInPublication0_connectOrCreate_this0:isInPublication]->(this_isInPublication0_connectOrCreate0) RETURN count(*) AS _ } WITH this CALL { WITH this - MERGE (this_isInPublication1_connectOrCreate0:\`Concept\`:\`Resource\` { \`$_uri\`: $this_isInPublication1_connectOrCreate_param0 }) + MERGE (this_isInPublication1_connectOrCreate0:Concept:Resource { \`$_uri\`: $this_isInPublication1_connectOrCreate_param0 }) ON CREATE SET this_isInPublication1_connectOrCreate0.\`$_uri\` = $this_isInPublication1_connectOrCreate_param1, this_isInPublication1_connectOrCreate0.prefLabel = $this_isInPublication1_connectOrCreate_param2 - MERGE (this)-[this_isInPublication1_connectOrCreate_this0:\`isInPublication\`]->(this_isInPublication1_connectOrCreate0) + MERGE (this)-[this_isInPublication1_connectOrCreate_this0:isInPublication]->(this_isInPublication1_connectOrCreate0) RETURN count(*) AS _ } WITH * CALL { WITH this - MATCH (this)-[update_this0:\`isInPublication\`]->(update_this1:\`Concept\`:\`Resource\`) + MATCH (this)-[update_this0:isInPublication]->(update_this1:Concept:Resource) WHERE update_this1.\`$_uri\` IN $update_param0 WITH update_this1 { iri: update_this1.\`$_uri\`, .prefLabel } AS update_this1 RETURN collect(update_this1) AS update_var2 diff --git a/packages/graphql/tests/tck/connections/connect-or-create/connect-or-create-auth.test.ts b/packages/graphql/tests/tck/connections/connect-or-create/connect-or-create-auth.test.ts index b74166748b..8ee7043ff2 100644 --- a/packages/graphql/tests/tck/connections/connect-or-create/connect-or-create-auth.test.ts +++ b/packages/graphql/tests/tck/connections/connect-or-create/connect-or-create-auth.test.ts @@ -82,17 +82,17 @@ describe("connectOrCreate", () => { WITH this0 CALL { WITH this0 - MERGE (this0_genres_connectOrCreate0:\`Genre\` { name: $this0_genres_connectOrCreate_param0 }) + MERGE (this0_genres_connectOrCreate0:Genre { name: $this0_genres_connectOrCreate_param0 }) ON CREATE SET this0_genres_connectOrCreate0.name = $this0_genres_connectOrCreate_param1 - MERGE (this0)-[this0_genres_connectOrCreate_this0:\`IN_GENRE\`]->(this0_genres_connectOrCreate0) + MERGE (this0)-[this0_genres_connectOrCreate_this0:IN_GENRE]->(this0_genres_connectOrCreate0) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $this0_genres_connectOrCreate_param3 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN count(*) AS _ } RETURN this0 } - RETURN [ this0 { .title } ] AS data" + RETURN [this0 { .title }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -126,17 +126,17 @@ describe("connectOrCreate", () => { WITH this0 CALL { WITH this0 - MERGE (this0_genres_connectOrCreate0:\`Genre\` { name: $this0_genres_connectOrCreate_param0 }) + MERGE (this0_genres_connectOrCreate0:Genre { name: $this0_genres_connectOrCreate_param0 }) ON CREATE SET this0_genres_connectOrCreate0.name = $this0_genres_connectOrCreate_param1 - MERGE (this0)-[this0_genres_connectOrCreate_this0:\`IN_GENRE\`]->(this0_genres_connectOrCreate0) + MERGE (this0)-[this0_genres_connectOrCreate_this0:IN_GENRE]->(this0_genres_connectOrCreate0) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $this0_genres_connectOrCreate_param3 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN count(*) AS _ } RETURN this0 } - RETURN [ this0 { .title } ] AS data" + RETURN [this0 { .title }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -170,17 +170,17 @@ describe("connectOrCreate", () => { WITH this0 CALL { WITH this0 - MERGE (this0_genres_connectOrCreate0:\`Genre\` { name: $this0_genres_connectOrCreate_param0 }) + MERGE (this0_genres_connectOrCreate0:Genre { name: $this0_genres_connectOrCreate_param0 }) ON CREATE SET this0_genres_connectOrCreate0.name = $this0_genres_connectOrCreate_param1 - MERGE (this0)-[this0_genres_connectOrCreate_this0:\`IN_GENRE\`]->(this0_genres_connectOrCreate0) + MERGE (this0)-[this0_genres_connectOrCreate_this0:IN_GENRE]->(this0_genres_connectOrCreate0) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $this0_genres_connectOrCreate_param3 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN count(*) AS _ } RETURN this0 } - RETURN [ this0 { .title } ] AS data" + RETURN [this0 { .title }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -214,15 +214,15 @@ describe("connectOrCreate", () => { WITH this0 CALL { WITH this0 - MERGE (this0_genres_connectOrCreate0:\`Genre\` { name: $this0_genres_connectOrCreate_param0 }) + MERGE (this0_genres_connectOrCreate0:Genre { name: $this0_genres_connectOrCreate_param0 }) ON CREATE SET this0_genres_connectOrCreate0.name = $this0_genres_connectOrCreate_param1 - MERGE (this0)-[this0_genres_connectOrCreate_this0:\`IN_GENRE\`]->(this0_genres_connectOrCreate0) + MERGE (this0)-[this0_genres_connectOrCreate_this0:IN_GENRE]->(this0_genres_connectOrCreate0) RETURN count(*) AS _ } RETURN this0 } - RETURN [ this0 { .title } ] AS data" + RETURN [this0 { .title }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -266,15 +266,15 @@ describe("connectOrCreate", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) SET this.title = $this_update_title WITH this CALL { WITH this - MERGE (this_genres0_connectOrCreate0:\`Genre\` { name: $this_genres0_connectOrCreate_param0 }) + MERGE (this_genres0_connectOrCreate0:Genre { name: $this_genres0_connectOrCreate_param0 }) ON CREATE SET this_genres0_connectOrCreate0.name = $this_genres0_connectOrCreate_param1 - MERGE (this)-[this_genres0_connectOrCreate_this0:\`IN_GENRE\`]->(this_genres0_connectOrCreate0) + MERGE (this)-[this_genres0_connectOrCreate_this0:IN_GENRE]->(this_genres0_connectOrCreate0) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $this_genres0_connectOrCreate_param3 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN count(*) AS _ @@ -307,15 +307,15 @@ describe("connectOrCreate", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) SET this.title = $this_update_title WITH this CALL { WITH this - MERGE (this_genres0_connectOrCreate0:\`Genre\` { name: $this_genres0_connectOrCreate_param0 }) + MERGE (this_genres0_connectOrCreate0:Genre { name: $this_genres0_connectOrCreate_param0 }) ON CREATE SET this_genres0_connectOrCreate0.name = $this_genres0_connectOrCreate_param1 - MERGE (this)-[this_genres0_connectOrCreate_this0:\`IN_GENRE\`]->(this_genres0_connectOrCreate0) + MERGE (this)-[this_genres0_connectOrCreate_this0:IN_GENRE]->(this_genres0_connectOrCreate0) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $this_genres0_connectOrCreate_param3 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN count(*) AS _ @@ -348,15 +348,15 @@ describe("connectOrCreate", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) SET this.title = $this_update_title WITH this CALL { WITH this - MERGE (this_genres0_connectOrCreate0:\`Genre\` { name: $this_genres0_connectOrCreate_param0 }) + MERGE (this_genres0_connectOrCreate0:Genre { name: $this_genres0_connectOrCreate_param0 }) ON CREATE SET this_genres0_connectOrCreate0.name = $this_genres0_connectOrCreate_param1 - MERGE (this)-[this_genres0_connectOrCreate_this0:\`IN_GENRE\`]->(this_genres0_connectOrCreate0) + MERGE (this)-[this_genres0_connectOrCreate_this0:IN_GENRE]->(this_genres0_connectOrCreate0) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $this_genres0_connectOrCreate_param3 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN count(*) AS _ @@ -389,15 +389,15 @@ describe("connectOrCreate", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) SET this.title = $this_update_title WITH this CALL { WITH this - MERGE (this_genres0_connectOrCreate0:\`Genre\` { name: $this_genres0_connectOrCreate_param0 }) + MERGE (this_genres0_connectOrCreate0:Genre { name: $this_genres0_connectOrCreate_param0 }) ON CREATE SET this_genres0_connectOrCreate0.name = $this_genres0_connectOrCreate_param1 - MERGE (this)-[this_genres0_connectOrCreate_this0:\`IN_GENRE\`]->(this_genres0_connectOrCreate0) + MERGE (this)-[this_genres0_connectOrCreate_this0:IN_GENRE]->(this_genres0_connectOrCreate0) RETURN count(*) AS _ } RETURN collect(DISTINCT this { .title }) AS data" @@ -440,15 +440,15 @@ describe("connectOrCreate", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) SET this.title = $this_update_title WITH this CALL { WITH this - MERGE (this_connectOrCreate_genres0:\`Genre\` { name: $this_connectOrCreate_genres_param0 }) + MERGE (this_connectOrCreate_genres0:Genre { name: $this_connectOrCreate_genres_param0 }) ON CREATE SET this_connectOrCreate_genres0.name = $this_connectOrCreate_genres_param1 - MERGE (this)-[this_connectOrCreate_genres_this0:\`IN_GENRE\`]->(this_connectOrCreate_genres0) + MERGE (this)-[this_connectOrCreate_genres_this0:IN_GENRE]->(this_connectOrCreate_genres0) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $this_connectOrCreate_genres_param3 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN count(*) AS _ @@ -482,15 +482,15 @@ describe("connectOrCreate", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) SET this.title = $this_update_title WITH this CALL { WITH this - MERGE (this_connectOrCreate_genres0:\`Genre\` { name: $this_connectOrCreate_genres_param0 }) + MERGE (this_connectOrCreate_genres0:Genre { name: $this_connectOrCreate_genres_param0 }) ON CREATE SET this_connectOrCreate_genres0.name = $this_connectOrCreate_genres_param1 - MERGE (this)-[this_connectOrCreate_genres_this0:\`IN_GENRE\`]->(this_connectOrCreate_genres0) + MERGE (this)-[this_connectOrCreate_genres_this0:IN_GENRE]->(this_connectOrCreate_genres0) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $this_connectOrCreate_genres_param3 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN count(*) AS _ @@ -524,15 +524,15 @@ describe("connectOrCreate", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) SET this.title = $this_update_title WITH this CALL { WITH this - MERGE (this_connectOrCreate_genres0:\`Genre\` { name: $this_connectOrCreate_genres_param0 }) + MERGE (this_connectOrCreate_genres0:Genre { name: $this_connectOrCreate_genres_param0 }) ON CREATE SET this_connectOrCreate_genres0.name = $this_connectOrCreate_genres_param1 - MERGE (this)-[this_connectOrCreate_genres_this0:\`IN_GENRE\`]->(this_connectOrCreate_genres0) + MERGE (this)-[this_connectOrCreate_genres_this0:IN_GENRE]->(this_connectOrCreate_genres0) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $this_connectOrCreate_genres_param3 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN count(*) AS _ @@ -566,15 +566,15 @@ describe("connectOrCreate", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) SET this.title = $this_update_title WITH this CALL { WITH this - MERGE (this_connectOrCreate_genres0:\`Genre\` { name: $this_connectOrCreate_genres_param0 }) + MERGE (this_connectOrCreate_genres0:Genre { name: $this_connectOrCreate_genres_param0 }) ON CREATE SET this_connectOrCreate_genres0.name = $this_connectOrCreate_genres_param1 - MERGE (this)-[this_connectOrCreate_genres_this0:\`IN_GENRE\`]->(this_connectOrCreate_genres0) + MERGE (this)-[this_connectOrCreate_genres_this0:IN_GENRE]->(this_connectOrCreate_genres0) RETURN count(*) AS _ } WITH * @@ -616,15 +616,15 @@ describe("connectOrCreate", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) SET this.title = $this_update_title WITH this CALL { WITH this - MERGE (this_connectOrCreate_genres0:\`Genre\` { name: $this_connectOrCreate_genres_param0 }) + MERGE (this_connectOrCreate_genres0:Genre { name: $this_connectOrCreate_genres_param0 }) ON CREATE SET this_connectOrCreate_genres0.name = $this_connectOrCreate_genres_param1 - MERGE (this)-[this_connectOrCreate_genres_this0:\`IN_GENRE\`]->(this_connectOrCreate_genres0) + MERGE (this)-[this_connectOrCreate_genres_this0:IN_GENRE]->(this_connectOrCreate_genres0) RETURN count(*) AS _ } WITH * diff --git a/packages/graphql/tests/tck/connections/connect-or-create/connect-or-create-unions.test.ts b/packages/graphql/tests/tck/connections/connect-or-create/connect-or-create-unions.test.ts index 25ea57414c..5e76c3cee3 100644 --- a/packages/graphql/tests/tck/connections/connect-or-create/connect-or-create-unions.test.ts +++ b/packages/graphql/tests/tck/connections/connect-or-create/connect-or-create-unions.test.ts @@ -104,11 +104,11 @@ describe("Create or connect with unions", () => { WITH this0 CALL { WITH this0 - MERGE (this0_actedIn_Movie_connectOrCreate0:\`Movie\` { isan: $this0_actedIn_Movie_connectOrCreate_param0 }) + MERGE (this0_actedIn_Movie_connectOrCreate0:Movie { isan: $this0_actedIn_Movie_connectOrCreate_param0 }) ON CREATE SET this0_actedIn_Movie_connectOrCreate0.title = $this0_actedIn_Movie_connectOrCreate_param1, this0_actedIn_Movie_connectOrCreate0.isan = $this0_actedIn_Movie_connectOrCreate_param2 - MERGE (this0)-[this0_actedIn_Movie_connectOrCreate_this0:\`ACTED_IN\`]->(this0_actedIn_Movie_connectOrCreate0) + MERGE (this0)-[this0_actedIn_Movie_connectOrCreate_this0:ACTED_IN]->(this0_actedIn_Movie_connectOrCreate0) ON CREATE SET this0_actedIn_Movie_connectOrCreate_this0.screentime = $this0_actedIn_Movie_connectOrCreate_param3 RETURN count(*) AS _ @@ -116,18 +116,18 @@ describe("Create or connect with unions", () => { WITH this0 CALL { WITH this0 - MERGE (this0_actedIn_Series_connectOrCreate0:\`Series\` { isan: $this0_actedIn_Series_connectOrCreate_param0 }) + MERGE (this0_actedIn_Series_connectOrCreate0:Series { isan: $this0_actedIn_Series_connectOrCreate_param0 }) ON CREATE SET this0_actedIn_Series_connectOrCreate0.title = $this0_actedIn_Series_connectOrCreate_param1, this0_actedIn_Series_connectOrCreate0.isan = $this0_actedIn_Series_connectOrCreate_param2 - MERGE (this0)-[this0_actedIn_Series_connectOrCreate_this0:\`ACTED_IN\`]->(this0_actedIn_Series_connectOrCreate0) + MERGE (this0)-[this0_actedIn_Series_connectOrCreate_this0:ACTED_IN]->(this0_actedIn_Series_connectOrCreate0) ON CREATE SET this0_actedIn_Series_connectOrCreate_this0.screentime = $this0_actedIn_Series_connectOrCreate_param3 RETURN count(*) AS _ } RETURN this0 } - RETURN [ this0 { .name } ] AS data" + RETURN [this0 { .name }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ @@ -190,17 +190,17 @@ describe("Create or connect with unions", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WHERE this.name = $param0 SET this.name = $this_update_name WITH this CALL { WITH this - MERGE (this_actedIn_Movie0_connectOrCreate0:\`Movie\` { isan: $this_actedIn_Movie0_connectOrCreate_param0 }) + MERGE (this_actedIn_Movie0_connectOrCreate0:Movie { isan: $this_actedIn_Movie0_connectOrCreate_param0 }) ON CREATE SET this_actedIn_Movie0_connectOrCreate0.title = $this_actedIn_Movie0_connectOrCreate_param1, this_actedIn_Movie0_connectOrCreate0.isan = $this_actedIn_Movie0_connectOrCreate_param2 - MERGE (this)-[this_actedIn_Movie0_connectOrCreate_this0:\`ACTED_IN\`]->(this_actedIn_Movie0_connectOrCreate0) + MERGE (this)-[this_actedIn_Movie0_connectOrCreate_this0:ACTED_IN]->(this_actedIn_Movie0_connectOrCreate0) ON CREATE SET this_actedIn_Movie0_connectOrCreate_this0.screentime = $this_actedIn_Movie0_connectOrCreate_param3 RETURN count(*) AS _ @@ -208,11 +208,11 @@ describe("Create or connect with unions", () => { WITH this CALL { WITH this - MERGE (this_actedIn_Series0_connectOrCreate0:\`Series\` { isan: $this_actedIn_Series0_connectOrCreate_param0 }) + MERGE (this_actedIn_Series0_connectOrCreate0:Series { isan: $this_actedIn_Series0_connectOrCreate_param0 }) ON CREATE SET this_actedIn_Series0_connectOrCreate0.title = $this_actedIn_Series0_connectOrCreate_param1, this_actedIn_Series0_connectOrCreate0.isan = $this_actedIn_Series0_connectOrCreate_param2 - MERGE (this)-[this_actedIn_Series0_connectOrCreate_this0:\`ACTED_IN\`]->(this_actedIn_Series0_connectOrCreate0) + MERGE (this)-[this_actedIn_Series0_connectOrCreate_this0:ACTED_IN]->(this_actedIn_Series0_connectOrCreate0) ON CREATE SET this_actedIn_Series0_connectOrCreate_this0.screentime = $this_actedIn_Series0_connectOrCreate_param3 RETURN count(*) AS _ diff --git a/packages/graphql/tests/tck/connections/connect-or-create/connect-or-create.test.ts b/packages/graphql/tests/tck/connections/connect-or-create/connect-or-create.test.ts index b11fdc09ee..100104f219 100644 --- a/packages/graphql/tests/tck/connections/connect-or-create/connect-or-create.test.ts +++ b/packages/graphql/tests/tck/connections/connect-or-create/connect-or-create.test.ts @@ -81,17 +81,17 @@ describe("Create or Connect", () => { WITH this0 CALL { WITH this0 - MERGE (this0_movies_connectOrCreate0:\`Movie\` { title: $this0_movies_connectOrCreate_param0 }) + MERGE (this0_movies_connectOrCreate0:Movie { title: $this0_movies_connectOrCreate_param0 }) ON CREATE SET this0_movies_connectOrCreate0.title = $this0_movies_connectOrCreate_param1 - MERGE (this0)-[this0_movies_connectOrCreate_this0:\`ACTED_IN\`]->(this0_movies_connectOrCreate0) + MERGE (this0)-[this0_movies_connectOrCreate_this0:ACTED_IN]->(this0_movies_connectOrCreate0) ON CREATE SET this0_movies_connectOrCreate_this0.screentime = $this0_movies_connectOrCreate_param2 RETURN count(*) AS _ } RETURN this0 } - RETURN [ this0 { .name } ] AS data" + RETURN [this0 { .name }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -133,16 +133,16 @@ describe("Create or Connect", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WHERE this.name = $param0 SET this.name = $this_update_name WITH this CALL { WITH this - MERGE (this_movies0_connectOrCreate0:\`Movie\` { title: $this_movies0_connectOrCreate_param0 }) + MERGE (this_movies0_connectOrCreate0:Movie { title: $this_movies0_connectOrCreate_param0 }) ON CREATE SET this_movies0_connectOrCreate0.title = $this_movies0_connectOrCreate_param1 - MERGE (this)-[this_movies0_connectOrCreate_this0:\`ACTED_IN\`]->(this_movies0_connectOrCreate0) + MERGE (this)-[this_movies0_connectOrCreate_this0:ACTED_IN]->(this_movies0_connectOrCreate0) ON CREATE SET this_movies0_connectOrCreate_this0.screentime = $this_movies0_connectOrCreate_param2 RETURN count(*) AS _ @@ -226,19 +226,19 @@ describe("Create or Connect", () => { WITH this0 CALL { WITH this0 - MERGE (this0_movies_connectOrCreate0:\`Movie\` { title: $this0_movies_connectOrCreate_param0 }) + MERGE (this0_movies_connectOrCreate0:Movie { title: $this0_movies_connectOrCreate_param0 }) ON CREATE SET this0_movies_connectOrCreate0.createdAt = datetime(), this0_movies_connectOrCreate0.id = randomUUID(), this0_movies_connectOrCreate0.title = $this0_movies_connectOrCreate_param1 - MERGE (this0)-[this0_movies_connectOrCreate_this0:\`ACTED_IN\`]->(this0_movies_connectOrCreate0) + MERGE (this0)-[this0_movies_connectOrCreate_this0:ACTED_IN]->(this0_movies_connectOrCreate0) ON CREATE SET this0_movies_connectOrCreate_this0.screentime = $this0_movies_connectOrCreate_param2 RETURN count(*) AS _ } RETURN this0 } - RETURN [ this0 { .name } ] AS data" + RETURN [this0 { .name }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -287,18 +287,18 @@ describe("Create or Connect", () => { WITH this0 CALL { WITH this0 - MERGE (this0_movies_connectOrCreate0:\`Movie\` { id: $this0_movies_connectOrCreate_param0 }) + MERGE (this0_movies_connectOrCreate0:Movie { id: $this0_movies_connectOrCreate_param0 }) ON CREATE SET this0_movies_connectOrCreate0.createdAt = datetime(), this0_movies_connectOrCreate0.title = $this0_movies_connectOrCreate_param1 - MERGE (this0)-[this0_movies_connectOrCreate_this0:\`ACTED_IN\`]->(this0_movies_connectOrCreate0) + MERGE (this0)-[this0_movies_connectOrCreate_this0:ACTED_IN]->(this0_movies_connectOrCreate0) ON CREATE SET this0_movies_connectOrCreate_this0.screentime = $this0_movies_connectOrCreate_param2 RETURN count(*) AS _ } RETURN this0 } - RETURN [ this0 { .name } ] AS data" + RETURN [this0 { .name }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -340,18 +340,18 @@ describe("Create or Connect", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WHERE this.name = $param0 SET this.name = $this_update_name WITH this CALL { WITH this - MERGE (this_movies0_connectOrCreate0:\`Movie\` { title: $this_movies0_connectOrCreate_param0 }) + MERGE (this_movies0_connectOrCreate0:Movie { title: $this_movies0_connectOrCreate_param0 }) ON CREATE SET this_movies0_connectOrCreate0.createdAt = datetime(), this_movies0_connectOrCreate0.id = randomUUID(), this_movies0_connectOrCreate0.title = $this_movies0_connectOrCreate_param1 - MERGE (this)-[this_movies0_connectOrCreate_this0:\`ACTED_IN\`]->(this_movies0_connectOrCreate0) + MERGE (this)-[this_movies0_connectOrCreate_this0:ACTED_IN]->(this_movies0_connectOrCreate0) ON CREATE SET this_movies0_connectOrCreate_this0.screentime = $this_movies0_connectOrCreate_param2 RETURN count(*) AS _ @@ -399,17 +399,17 @@ describe("Create or Connect", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WHERE this.name = $param0 SET this.name = $this_update_name WITH this CALL { WITH this - MERGE (this_movies0_connectOrCreate0:\`Movie\` { id: $this_movies0_connectOrCreate_param0 }) + MERGE (this_movies0_connectOrCreate0:Movie { id: $this_movies0_connectOrCreate_param0 }) ON CREATE SET this_movies0_connectOrCreate0.createdAt = datetime(), this_movies0_connectOrCreate0.title = $this_movies0_connectOrCreate_param1 - MERGE (this)-[this_movies0_connectOrCreate_this0:\`ACTED_IN\`]->(this_movies0_connectOrCreate0) + MERGE (this)-[this_movies0_connectOrCreate_this0:ACTED_IN]->(this_movies0_connectOrCreate0) ON CREATE SET this_movies0_connectOrCreate_this0.screentime = $this_movies0_connectOrCreate_param2 RETURN count(*) AS _ @@ -494,10 +494,10 @@ describe("Create or Connect", () => { WITH this0 CALL { WITH this0 - MERGE (this0_movies_connectOrCreate0:\`Movie\` { title: $this0_movies_connectOrCreate_param0 }) + MERGE (this0_movies_connectOrCreate0:Movie { title: $this0_movies_connectOrCreate_param0 }) ON CREATE SET this0_movies_connectOrCreate0.title = $this0_movies_connectOrCreate_param1 - MERGE (this0)-[this0_movies_connectOrCreate_this0:\`ACTED_IN\`]->(this0_movies_connectOrCreate0) + MERGE (this0)-[this0_movies_connectOrCreate_this0:ACTED_IN]->(this0_movies_connectOrCreate0) ON CREATE SET this0_movies_connectOrCreate_this0.createdAt = datetime(), this0_movies_connectOrCreate_this0.id = randomUUID(), @@ -506,7 +506,7 @@ describe("Create or Connect", () => { } RETURN this0 } - RETURN [ this0 { .name } ] AS data" + RETURN [this0 { .name }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -548,16 +548,16 @@ describe("Create or Connect", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WHERE this.name = $param0 SET this.name = $this_update_name WITH this CALL { WITH this - MERGE (this_movies0_connectOrCreate0:\`Movie\` { title: $this_movies0_connectOrCreate_param0 }) + MERGE (this_movies0_connectOrCreate0:Movie { title: $this_movies0_connectOrCreate_param0 }) ON CREATE SET this_movies0_connectOrCreate0.title = $this_movies0_connectOrCreate_param1 - MERGE (this)-[this_movies0_connectOrCreate_this0:\`ACTED_IN\`]->(this_movies0_connectOrCreate0) + MERGE (this)-[this_movies0_connectOrCreate_this0:ACTED_IN]->(this_movies0_connectOrCreate0) ON CREATE SET this_movies0_connectOrCreate_this0.createdAt = datetime(), this_movies0_connectOrCreate_this0.id = randomUUID(), diff --git a/packages/graphql/tests/tck/connections/filtering/composite.test.ts b/packages/graphql/tests/tck/connections/filtering/composite.test.ts index ccc1a310e4..fcddb09f4b 100644 --- a/packages/graphql/tests/tck/connections/filtering/composite.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/composite.test.ts @@ -75,11 +75,11 @@ describe("Cypher -> Connections -> Filtering -> Composite", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE ((this0.screenTime > $param1 AND this0.screenTime < $param2) AND (this1.firstName = $param3 AND this1.lastName = $param4)) WITH { screenTime: this0.screenTime, node: { firstName: this1.firstName, lastName: this1.lastName } } AS edge WITH collect(edge) AS edges @@ -132,11 +132,11 @@ describe("Cypher -> Connections -> Filtering -> Composite", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE (NOT (this0.screenTime < $param1 AND this0.screenTime > $param2) AND NOT (this1.firstName = $param3 AND this1.lastName = $param4)) WITH { screenTime: this0.screenTime, node: { firstName: this1.firstName, lastName: this1.lastName } } AS edge WITH collect(edge) AS edges diff --git a/packages/graphql/tests/tck/connections/filtering/node/and.test.ts b/packages/graphql/tests/tck/connections/filtering/node/and.test.ts index ecf5bdca03..1244235a02 100644 --- a/packages/graphql/tests/tck/connections/filtering/node/and.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/node/and.test.ts @@ -70,10 +70,10 @@ describe("Cypher -> Connections -> Filtering -> Node -> AND", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE (this1.firstName = $param0 AND this1.lastName = $param1) WITH { screenTime: this0.screenTime, node: { firstName: this1.firstName, lastName: this1.lastName } } AS edge WITH collect(edge) AS edges @@ -112,10 +112,10 @@ describe("Cypher -> Connections -> Filtering -> Node -> AND", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE NOT (this1.firstName = $param0) WITH { screenTime: this0.screenTime, node: { firstName: this1.firstName, lastName: this1.lastName } } AS edge WITH collect(edge) AS edges diff --git a/packages/graphql/tests/tck/connections/filtering/node/arrays.test.ts b/packages/graphql/tests/tck/connections/filtering/node/arrays.test.ts index e817f128be..f259e5afa1 100644 --- a/packages/graphql/tests/tck/connections/filtering/node/arrays.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/node/arrays.test.ts @@ -69,10 +69,10 @@ describe("Cypher -> Connections -> Filtering -> Node -> Arrays", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE this1.name IN $param0 WITH { screenTime: this0.screenTime, node: { name: this1.name } } AS edge WITH collect(edge) AS edges @@ -112,10 +112,10 @@ describe("Cypher -> Connections -> Filtering -> Node -> Arrays", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE NOT (this1.name IN $param0) WITH { screenTime: this0.screenTime, node: { name: this1.name } } AS edge WITH collect(edge) AS edges @@ -156,10 +156,10 @@ describe("Cypher -> Connections -> Filtering -> Node -> Arrays", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE $param0 IN this1.favouriteColours WITH { screenTime: this0.screenTime, node: { name: this1.name, favouriteColours: this1.favouriteColours } } AS edge WITH collect(edge) AS edges @@ -197,10 +197,10 @@ describe("Cypher -> Connections -> Filtering -> Node -> Arrays", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE NOT ($param0 IN this1.favouriteColours) WITH { screenTime: this0.screenTime, node: { name: this1.name, favouriteColours: this1.favouriteColours } } AS edge WITH collect(edge) AS edges diff --git a/packages/graphql/tests/tck/connections/filtering/node/equality.test.ts b/packages/graphql/tests/tck/connections/filtering/node/equality.test.ts index 58c41af9c7..73631b68e2 100644 --- a/packages/graphql/tests/tck/connections/filtering/node/equality.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/node/equality.test.ts @@ -68,10 +68,10 @@ describe("Cypher -> Connections -> Filtering -> Node -> Equality", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE this1.name = $param0 WITH { screenTime: this0.screenTime, node: { name: this1.name } } AS edge WITH collect(edge) AS edges @@ -108,10 +108,10 @@ describe("Cypher -> Connections -> Filtering -> Node -> Equality", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE NOT (this1.name = $param0) WITH { screenTime: this0.screenTime, node: { name: this1.name } } AS edge WITH collect(edge) AS edges diff --git a/packages/graphql/tests/tck/connections/filtering/node/numerical.test.ts b/packages/graphql/tests/tck/connections/filtering/node/numerical.test.ts index 999c24fe7a..e14253a423 100644 --- a/packages/graphql/tests/tck/connections/filtering/node/numerical.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/node/numerical.test.ts @@ -70,10 +70,10 @@ describe("Cypher -> Connections -> Filtering -> Node -> Numerical", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE this1.age < $param0 WITH { screenTime: this0.screenTime, node: { name: this1.name, age: this1.age } } AS edge WITH collect(edge) AS edges @@ -114,10 +114,10 @@ describe("Cypher -> Connections -> Filtering -> Node -> Numerical", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE this1.age <= $param0 WITH { screenTime: this0.screenTime, node: { name: this1.name, age: this1.age } } AS edge WITH collect(edge) AS edges @@ -158,10 +158,10 @@ describe("Cypher -> Connections -> Filtering -> Node -> Numerical", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE this1.age > $param0 WITH { screenTime: this0.screenTime, node: { name: this1.name, age: this1.age } } AS edge WITH collect(edge) AS edges @@ -202,10 +202,10 @@ describe("Cypher -> Connections -> Filtering -> Node -> Numerical", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE this1.age >= $param0 WITH { screenTime: this0.screenTime, node: { name: this1.name, age: this1.age } } AS edge WITH collect(edge) AS edges diff --git a/packages/graphql/tests/tck/connections/filtering/node/or.test.ts b/packages/graphql/tests/tck/connections/filtering/node/or.test.ts index cb5df86e9f..8c2281b591 100644 --- a/packages/graphql/tests/tck/connections/filtering/node/or.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/node/or.test.ts @@ -70,10 +70,10 @@ describe("Cypher -> Connections -> Filtering -> Node -> OR", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE (this1.firstName = $param0 OR this1.lastName = $param1) WITH { screenTime: this0.screenTime, node: { firstName: this1.firstName, lastName: this1.lastName } } AS edge WITH collect(edge) AS edges diff --git a/packages/graphql/tests/tck/connections/filtering/node/points.test.ts b/packages/graphql/tests/tck/connections/filtering/node/points.test.ts index 55ba519177..943728053a 100644 --- a/packages/graphql/tests/tck/connections/filtering/node/points.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/node/points.test.ts @@ -86,10 +86,10 @@ describe("Cypher -> Connections -> Filtering -> Node -> Points", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE point.distance(this1.currentLocation, point($param0.point)) = $param0.distance WITH { screenTime: this0.screenTime, node: { name: this1.name, currentLocation: CASE WHEN this1.currentLocation IS NOT NULL THEN { point: this1.currentLocation } diff --git a/packages/graphql/tests/tck/connections/filtering/node/relationship.test.ts b/packages/graphql/tests/tck/connections/filtering/node/relationship.test.ts index 6c885f7da7..7424020503 100644 --- a/packages/graphql/tests/tck/connections/filtering/node/relationship.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/node/relationship.test.ts @@ -63,12 +63,12 @@ describe("Cypher -> Connections -> Filtering -> Node -> Relationship", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE EXISTS { - MATCH (this1)-[:\`ACTED_IN\`]->(this2:\`Movie\`) + MATCH (this1)-[:ACTED_IN]->(this2:Movie) WHERE this2.title = $param0 } WITH { node: { name: this1.name } } AS edge diff --git a/packages/graphql/tests/tck/connections/filtering/node/string.test.ts b/packages/graphql/tests/tck/connections/filtering/node/string.test.ts index a37a00767f..e447fea211 100644 --- a/packages/graphql/tests/tck/connections/filtering/node/string.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/node/string.test.ts @@ -85,10 +85,10 @@ describe("Cypher -> Connections -> Filtering -> Node -> String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE this1.name CONTAINS $param0 WITH { screenTime: this0.screenTime, node: { name: this1.name } } AS edge WITH collect(edge) AS edges @@ -125,10 +125,10 @@ describe("Cypher -> Connections -> Filtering -> Node -> String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE NOT (this1.name CONTAINS $param0) WITH { screenTime: this0.screenTime, node: { name: this1.name } } AS edge WITH collect(edge) AS edges @@ -165,10 +165,10 @@ describe("Cypher -> Connections -> Filtering -> Node -> String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE this1.name STARTS WITH $param0 WITH { screenTime: this0.screenTime, node: { name: this1.name } } AS edge WITH collect(edge) AS edges @@ -205,10 +205,10 @@ describe("Cypher -> Connections -> Filtering -> Node -> String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE NOT (this1.name STARTS WITH $param0) WITH { screenTime: this0.screenTime, node: { name: this1.name } } AS edge WITH collect(edge) AS edges @@ -245,10 +245,10 @@ describe("Cypher -> Connections -> Filtering -> Node -> String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE this1.name ENDS WITH $param0 WITH { screenTime: this0.screenTime, node: { name: this1.name } } AS edge WITH collect(edge) AS edges @@ -285,10 +285,10 @@ describe("Cypher -> Connections -> Filtering -> Node -> String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE NOT (this1.name ENDS WITH $param0) WITH { screenTime: this0.screenTime, node: { name: this1.name } } AS edge WITH collect(edge) AS edges @@ -325,10 +325,10 @@ describe("Cypher -> Connections -> Filtering -> Node -> String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE this1.name =~ $param0 WITH { screenTime: this0.screenTime, node: { name: this1.name } } AS edge WITH collect(edge) AS edges diff --git a/packages/graphql/tests/tck/connections/filtering/relationship/and.test.ts b/packages/graphql/tests/tck/connections/filtering/relationship/and.test.ts index f8ae9a80f1..2a80be5e1f 100644 --- a/packages/graphql/tests/tck/connections/filtering/relationship/and.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/relationship/and.test.ts @@ -70,10 +70,10 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> AND", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE (this0.role ENDS WITH $param0 AND this0.screenTime < $param1) WITH { role: this0.role, screenTime: this0.screenTime, node: { name: this1.name } } AS edge WITH collect(edge) AS edges @@ -115,10 +115,10 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> AND", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE NOT (this0.role ENDS WITH $param0) WITH { role: this0.role, screenTime: this0.screenTime, node: { name: this1.name } } AS edge WITH collect(edge) AS edges diff --git a/packages/graphql/tests/tck/connections/filtering/relationship/arrays.test.ts b/packages/graphql/tests/tck/connections/filtering/relationship/arrays.test.ts index 8499e3e343..c8839a0852 100644 --- a/packages/graphql/tests/tck/connections/filtering/relationship/arrays.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/relationship/arrays.test.ts @@ -69,10 +69,10 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Arrays", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE this0.screenTime IN $param0 WITH { screenTime: this0.screenTime, node: { name: this1.name } } AS edge WITH collect(edge) AS edges @@ -118,10 +118,10 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Arrays", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE NOT (this0.screenTime IN $param0) WITH { screenTime: this0.screenTime, node: { name: this1.name } } AS edge WITH collect(edge) AS edges @@ -167,10 +167,10 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Arrays", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE $param0 IN this0.quotes WITH { screenTime: this0.screenTime, node: { name: this1.name } } AS edge WITH collect(edge) AS edges @@ -207,10 +207,10 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Arrays", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE NOT ($param0 IN this0.quotes) WITH { screenTime: this0.screenTime, node: { name: this1.name } } AS edge WITH collect(edge) AS edges diff --git a/packages/graphql/tests/tck/connections/filtering/relationship/equality.test.ts b/packages/graphql/tests/tck/connections/filtering/relationship/equality.test.ts index a833133949..2c6cf8d5e0 100644 --- a/packages/graphql/tests/tck/connections/filtering/relationship/equality.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/relationship/equality.test.ts @@ -68,10 +68,10 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Equality", () => const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE this0.screenTime = $param0 WITH { screenTime: this0.screenTime, node: { name: this1.name } } AS edge WITH collect(edge) AS edges @@ -111,10 +111,10 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Equality", () => const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE NOT (this0.screenTime = $param0) WITH { screenTime: this0.screenTime, node: { name: this1.name } } AS edge WITH collect(edge) AS edges diff --git a/packages/graphql/tests/tck/connections/filtering/relationship/numerical.test.ts b/packages/graphql/tests/tck/connections/filtering/relationship/numerical.test.ts index 211f4e0a93..ef945d40bc 100644 --- a/packages/graphql/tests/tck/connections/filtering/relationship/numerical.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/relationship/numerical.test.ts @@ -68,10 +68,10 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Numerical", () = const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE this0.screenTime < $param0 WITH { screenTime: this0.screenTime, node: { name: this1.name } } AS edge WITH collect(edge) AS edges @@ -111,10 +111,10 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Numerical", () = const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE this0.screenTime <= $param0 WITH { screenTime: this0.screenTime, node: { name: this1.name } } AS edge WITH collect(edge) AS edges @@ -154,10 +154,10 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Numerical", () = const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE this0.screenTime > $param0 WITH { screenTime: this0.screenTime, node: { name: this1.name } } AS edge WITH collect(edge) AS edges @@ -197,10 +197,10 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Numerical", () = const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE this0.screenTime >= $param0 WITH { screenTime: this0.screenTime, node: { name: this1.name } } AS edge WITH collect(edge) AS edges diff --git a/packages/graphql/tests/tck/connections/filtering/relationship/or.test.ts b/packages/graphql/tests/tck/connections/filtering/relationship/or.test.ts index 7cca87dd67..5d02969bbf 100644 --- a/packages/graphql/tests/tck/connections/filtering/relationship/or.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/relationship/or.test.ts @@ -70,10 +70,10 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> OR", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE (this0.role ENDS WITH $param0 OR this0.screenTime < $param1) WITH { role: this0.role, screenTime: this0.screenTime, node: { name: this1.name } } AS edge WITH collect(edge) AS edges diff --git a/packages/graphql/tests/tck/connections/filtering/relationship/points.test.ts b/packages/graphql/tests/tck/connections/filtering/relationship/points.test.ts index 9daf65293a..ef1ba00015 100644 --- a/packages/graphql/tests/tck/connections/filtering/relationship/points.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/relationship/points.test.ts @@ -84,10 +84,10 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Points", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE point.distance(this0.location, point($param0.point)) = $param0.distance WITH { screenTime: this0.screenTime, location: CASE WHEN this0.location IS NOT NULL THEN { point: this0.location } diff --git a/packages/graphql/tests/tck/connections/filtering/relationship/string.test.ts b/packages/graphql/tests/tck/connections/filtering/relationship/string.test.ts index 366e97b42c..342a33b671 100644 --- a/packages/graphql/tests/tck/connections/filtering/relationship/string.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/relationship/string.test.ts @@ -86,10 +86,10 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE this0.role CONTAINS $param0 WITH { role: this0.role, node: { name: this1.name } } AS edge WITH collect(edge) AS edges @@ -126,10 +126,10 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE NOT (this0.role CONTAINS $param0) WITH { role: this0.role, node: { name: this1.name } } AS edge WITH collect(edge) AS edges @@ -166,10 +166,10 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE this0.role STARTS WITH $param0 WITH { role: this0.role, node: { name: this1.name } } AS edge WITH collect(edge) AS edges @@ -206,10 +206,10 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE NOT (this0.role STARTS WITH $param0) WITH { role: this0.role, node: { name: this1.name } } AS edge WITH collect(edge) AS edges @@ -246,10 +246,10 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE this0.role ENDS WITH $param0 WITH { role: this0.role, node: { name: this1.name } } AS edge WITH collect(edge) AS edges @@ -286,10 +286,10 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE NOT (this0.role ENDS WITH $param0) WITH { role: this0.role, node: { name: this1.name } } AS edge WITH collect(edge) AS edges @@ -326,10 +326,10 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE this0.role =~ $param0 WITH { role: this0.role, node: { name: this1.name } } AS edge WITH collect(edge) AS edges diff --git a/packages/graphql/tests/tck/connections/filtering/relationship/temporal.test.ts b/packages/graphql/tests/tck/connections/filtering/relationship/temporal.test.ts index 1a531fcb8a..88af9c47f6 100644 --- a/packages/graphql/tests/tck/connections/filtering/relationship/temporal.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/relationship/temporal.test.ts @@ -72,10 +72,10 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Temporal", () => const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE (this0.startDate > $param0 AND this0.endDateTime < $param1) WITH { startDate: this0.startDate, endDateTime: apoc.date.convertFormat(toString(this0.endDateTime), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\"), node: { name: this1.name } } AS edge WITH collect(edge) AS edges diff --git a/packages/graphql/tests/tck/connections/interfaces.test.ts b/packages/graphql/tests/tck/connections/interfaces.test.ts index c48f8fed3a..04a1e6ff37 100644 --- a/packages/graphql/tests/tck/connections/interfaces.test.ts +++ b/packages/graphql/tests/tck/connections/interfaces.test.ts @@ -83,17 +83,17 @@ describe("Cypher -> Connections -> Interfaces", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this CALL { WITH this - MATCH (this)-[this0:\`ACTED_IN\`]->(this1:\`Movie\`) + MATCH (this)-[this0:ACTED_IN]->(this1:Movie) WITH { screenTime: this0.screenTime, node: { __resolveType: \\"Movie\\", __id: id(this1), runtime: this1.runtime, title: this1.title } } AS edge RETURN edge UNION WITH this - MATCH (this)-[this2:\`ACTED_IN\`]->(this3:\`Series\`) + MATCH (this)-[this2:ACTED_IN]->(this3:Series) WITH { screenTime: this2.screenTime, node: { __resolveType: \\"Series\\", __id: id(this3), episodes: this3.episodes, title: this3.title } } AS edge RETURN edge } @@ -133,18 +133,18 @@ describe("Cypher -> Connections -> Interfaces", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this CALL { WITH this - MATCH (this)-[this0:\`ACTED_IN\`]->(this1:\`Movie\`) + MATCH (this)-[this0:ACTED_IN]->(this1:Movie) WHERE this1.title STARTS WITH $param0 WITH { screenTime: this0.screenTime, node: { __resolveType: \\"Movie\\", __id: id(this1), runtime: this1.runtime, title: this1.title } } AS edge RETURN edge UNION WITH this - MATCH (this)-[this2:\`ACTED_IN\`]->(this3:\`Series\`) + MATCH (this)-[this2:ACTED_IN]->(this3:Series) WHERE this3.title STARTS WITH $param1 WITH { screenTime: this2.screenTime, node: { __resolveType: \\"Series\\", __id: id(this3), episodes: this3.episodes, title: this3.title } } AS edge RETURN edge @@ -192,18 +192,18 @@ describe("Cypher -> Connections -> Interfaces", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this CALL { WITH this - MATCH (this)-[this0:\`ACTED_IN\`]->(this1:\`Movie\`) + MATCH (this)-[this0:ACTED_IN]->(this1:Movie) WHERE this1.runtime > $param0 WITH { screenTime: this0.screenTime, node: { __resolveType: \\"Movie\\", __id: id(this1), runtime: this1.runtime, title: this1.title } } AS edge RETURN edge UNION WITH this - MATCH (this)-[this2:\`ACTED_IN\`]->(this3:\`Series\`) + MATCH (this)-[this2:ACTED_IN]->(this3:Series) WHERE this3.episodes > $param1 WITH { screenTime: this2.screenTime, node: { __resolveType: \\"Series\\", __id: id(this3), episodes: this3.episodes, title: this3.title } } AS edge RETURN edge @@ -255,18 +255,18 @@ describe("Cypher -> Connections -> Interfaces", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this CALL { WITH this - MATCH (this)-[this0:\`ACTED_IN\`]->(this1:\`Movie\`) + MATCH (this)-[this0:ACTED_IN]->(this1:Movie) WHERE this0.screenTime > $param0 WITH { screenTime: this0.screenTime, node: { __resolveType: \\"Movie\\", __id: id(this1), runtime: this1.runtime, title: this1.title } } AS edge RETURN edge UNION WITH this - MATCH (this)-[this2:\`ACTED_IN\`]->(this3:\`Series\`) + MATCH (this)-[this2:ACTED_IN]->(this3:Series) WHERE this2.screenTime > $param1 WITH { screenTime: this2.screenTime, node: { __resolveType: \\"Series\\", __id: id(this3), episodes: this3.episodes, title: this3.title } } AS edge RETURN edge @@ -320,17 +320,17 @@ describe("Cypher -> Connections -> Interfaces", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this CALL { WITH this - MATCH (this)-[this0:\`ACTED_IN\`]->(this1:\`Movie\`) + MATCH (this)-[this0:ACTED_IN]->(this1:Movie) WITH { screenTime: this0.screenTime, node: { __resolveType: \\"Movie\\", __id: id(this1), runtime: this1.runtime, title: this1.title } } AS edge RETURN edge UNION WITH this - MATCH (this)-[this2:\`ACTED_IN\`]->(this3:\`Series\`) + MATCH (this)-[this2:ACTED_IN]->(this3:Series) WITH { screenTime: this2.screenTime, node: { __resolveType: \\"Series\\", __id: id(this3), episodes: this3.episodes, title: this3.title } } AS edge RETURN edge } @@ -374,17 +374,17 @@ describe("Cypher -> Connections -> Interfaces", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this CALL { WITH this - MATCH (this)-[this0:\`ACTED_IN\`]->(this1:\`Movie\`) + MATCH (this)-[this0:ACTED_IN]->(this1:Movie) WITH { screenTime: this0.screenTime, node: { __resolveType: \\"Movie\\", __id: id(this1), runtime: this1.runtime, title: this1.title } } AS edge RETURN edge UNION WITH this - MATCH (this)-[this2:\`ACTED_IN\`]->(this3:\`Series\`) + MATCH (this)-[this2:ACTED_IN]->(this3:Series) WITH { screenTime: this2.screenTime, node: { __resolveType: \\"Series\\", __id: id(this3), episodes: this3.episodes, title: this3.title } } AS edge RETURN edge } @@ -429,17 +429,17 @@ describe("Cypher -> Connections -> Interfaces", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this CALL { WITH this - MATCH (this)-[this0:\`ACTED_IN\`]->(this1:\`Movie\`) + MATCH (this)-[this0:ACTED_IN]->(this1:Movie) WITH { screenTime: this0.screenTime, node: { __resolveType: \\"Movie\\", __id: id(this1), runtime: this1.runtime, title: this1.title } } AS edge RETURN edge UNION WITH this - MATCH (this)-[this2:\`ACTED_IN\`]->(this3:\`Series\`) + MATCH (this)-[this2:ACTED_IN]->(this3:Series) WITH { screenTime: this2.screenTime, node: { __resolveType: \\"Series\\", __id: id(this3), episodes: this3.episodes, title: this3.title } } AS edge RETURN edge } @@ -482,17 +482,17 @@ describe("Cypher -> Connections -> Interfaces", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this CALL { WITH this - MATCH (this)-[this0:\`ACTED_IN\`]->(this1:\`Movie\`) + MATCH (this)-[this0:ACTED_IN]->(this1:Movie) WITH { screenTime: this0.screenTime, node: { __resolveType: \\"Movie\\", __id: id(this1), runtime: this1.runtime, title: this1.title } } AS edge RETURN edge UNION WITH this - MATCH (this)-[this2:\`ACTED_IN\`]->(this3:\`Series\`) + MATCH (this)-[this2:ACTED_IN]->(this3:Series) WITH { screenTime: this2.screenTime, node: { __resolveType: \\"Series\\", __id: id(this3), episodes: this3.episodes, title: this3.title } } AS edge RETURN edge } diff --git a/packages/graphql/tests/tck/connections/mixed-nesting.test.ts b/packages/graphql/tests/tck/connections/mixed-nesting.test.ts index c637d68241..675582e44f 100644 --- a/packages/graphql/tests/tck/connections/mixed-nesting.test.ts +++ b/packages/graphql/tests/tck/connections/mixed-nesting.test.ts @@ -71,15 +71,15 @@ describe("Mixed nesting", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE this1.name = $param1 CALL { WITH this1 - MATCH (this1)-[this2:\`ACTED_IN\`]->(this3:\`Movie\`) + MATCH (this1)-[this2:ACTED_IN]->(this3:Movie) WHERE NOT (this3.title = $param2) WITH this3 { .title } AS this3 RETURN collect(this3) AS var4 @@ -131,19 +131,19 @@ describe("Mixed nesting", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE this1.name = $param1 CALL { WITH this1 - MATCH (this1:\`Actor\`)-[this2:\`ACTED_IN\`]->(this3:\`Movie\`) + MATCH (this1:Actor)-[this2:ACTED_IN]->(this3:Movie) WHERE NOT (this3.title = $param2) CALL { WITH this3 - MATCH (this3)<-[this4:\`ACTED_IN\`]-(this5:\`Actor\`) + MATCH (this3)<-[this4:ACTED_IN]-(this5:Actor) WHERE NOT (this5.name = $param3) WITH this5 { .name } AS this5 RETURN collect(this5) AS var6 @@ -194,15 +194,15 @@ describe("Mixed nesting", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE this1.name = $param1 CALL { WITH this1 - MATCH (this1:\`Actor\`)-[this2:\`ACTED_IN\`]->(this3:\`Movie\`) + MATCH (this1:Actor)-[this2:ACTED_IN]->(this3:Movie) WHERE NOT (this3.title = $param2) WITH { screenTime: this2.screenTime, node: { title: this3.title } } AS edge WITH collect(edge) AS edges diff --git a/packages/graphql/tests/tck/connections/projections/create.test.ts b/packages/graphql/tests/tck/connections/projections/create.test.ts index 76e3c63349..fa3de743b2 100644 --- a/packages/graphql/tests/tck/connections/projections/create.test.ts +++ b/packages/graphql/tests/tck/connections/projections/create.test.ts @@ -73,14 +73,14 @@ describe("Cypher -> Connections -> Projections -> Create", () => { "UNWIND $create_param0 AS create_var4 CALL { WITH create_var4 - CREATE (create_this0:\`Movie\`) + CREATE (create_this0:Movie) SET create_this0.title = create_var4.title RETURN create_this0 } CALL { WITH create_this0 - MATCH (create_this0:\`Movie\`)<-[create_this1:\`ACTED_IN\`]-(create_this2:\`Actor\`) + MATCH (create_this0:Movie)<-[create_this1:ACTED_IN]-(create_this2:Actor) WITH { screenTime: create_this1.screenTime, node: { name: create_this2.name } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount @@ -126,14 +126,14 @@ describe("Cypher -> Connections -> Projections -> Create", () => { "UNWIND $create_param0 AS create_var4 CALL { WITH create_var4 - CREATE (create_this0:\`Movie\`) + CREATE (create_this0:Movie) SET create_this0.title = create_var4.title RETURN create_this0 } CALL { WITH create_this0 - MATCH (create_this0:\`Movie\`)<-[create_this1:\`ACTED_IN\`]-(create_this2:\`Actor\`) + MATCH (create_this0:Movie)<-[create_this1:ACTED_IN]-(create_this2:Actor) WITH { screenTime: create_this1.screenTime, node: { name: create_this2.name } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount @@ -182,14 +182,14 @@ describe("Cypher -> Connections -> Projections -> Create", () => { "UNWIND $create_param1 AS create_var4 CALL { WITH create_var4 - CREATE (create_this0:\`Movie\`) + CREATE (create_this0:Movie) SET create_this0.title = create_var4.title RETURN create_this0 } CALL { WITH create_this0 - MATCH (create_this0:\`Movie\`)<-[create_this1:\`ACTED_IN\`]-(create_this2:\`Actor\`) + MATCH (create_this0:Movie)<-[create_this1:ACTED_IN]-(create_this2:Actor) WHERE create_this2.name = $create_param0 WITH { screenTime: create_this1.screenTime, node: { name: create_this2.name } } AS edge WITH collect(edge) AS edges diff --git a/packages/graphql/tests/tck/connections/projections/projections.test.ts b/packages/graphql/tests/tck/connections/projections/projections.test.ts index d95d938278..f1ecf4801a 100644 --- a/packages/graphql/tests/tck/connections/projections/projections.test.ts +++ b/packages/graphql/tests/tck/connections/projections/projections.test.ts @@ -66,11 +66,11 @@ describe("Relay Cursor Connection projections", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WITH { node: { __resolveType: \\"Actor\\", __id: id(this1) } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount @@ -106,11 +106,11 @@ describe("Relay Cursor Connection projections", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WITH { node: { __resolveType: \\"Actor\\", __id: id(this1) } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount @@ -141,11 +141,11 @@ describe("Relay Cursor Connection projections", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WITH { node: { __resolveType: \\"Actor\\", __id: id(this1) } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount @@ -188,18 +188,18 @@ describe("Relay Cursor Connection projections", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WHERE this.name = $param0 CALL { WITH this CALL { WITH this - MATCH (this)-[this0:\`ACTED_IN\`]->(this1:\`Movie\`) + MATCH (this)-[this0:ACTED_IN]->(this1:Movie) WITH { node: { __resolveType: \\"Movie\\", __id: id(this1) } } AS edge RETURN edge UNION WITH this - MATCH (this)-[this2:\`ACTED_IN\`]->(this3:\`Series\`) + MATCH (this)-[this2:ACTED_IN]->(this3:Series) WITH { node: { __resolveType: \\"Series\\", __id: id(this3) } } AS edge RETURN edge } @@ -237,18 +237,18 @@ describe("Relay Cursor Connection projections", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WHERE this.name = $param0 CALL { WITH this CALL { WITH this - MATCH (this)-[this0:\`ACTED_IN\`]->(this1:\`Movie\`) + MATCH (this)-[this0:ACTED_IN]->(this1:Movie) WITH { node: { __resolveType: \\"Movie\\", __id: id(this1) } } AS edge RETURN edge UNION WITH this - MATCH (this)-[this2:\`ACTED_IN\`]->(this3:\`Series\`) + MATCH (this)-[this2:ACTED_IN]->(this3:Series) WITH { node: { __resolveType: \\"Series\\", __id: id(this3) } } AS edge RETURN edge } @@ -286,11 +286,11 @@ describe("Relay Cursor Connection projections", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WITH { node: { name: this1.name } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount @@ -326,11 +326,11 @@ describe("Relay Cursor Connection projections", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WITH { node: { name: this1.name } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount diff --git a/packages/graphql/tests/tck/connections/projections/update.test.ts b/packages/graphql/tests/tck/connections/projections/update.test.ts index 68dd162220..3e11b8c4ae 100644 --- a/packages/graphql/tests/tck/connections/projections/update.test.ts +++ b/packages/graphql/tests/tck/connections/projections/update.test.ts @@ -71,12 +71,12 @@ describe("Cypher -> Connections -> Projections -> Update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 WITH * CALL { WITH this - MATCH (this)<-[update_this0:\`ACTED_IN\`]-(update_this1:\`Actor\`) + MATCH (this)<-[update_this0:ACTED_IN]-(update_this1:Actor) WITH { screenTime: update_this0.screenTime, node: { name: update_this1.name } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount diff --git a/packages/graphql/tests/tck/connections/relationship-properties.test.ts b/packages/graphql/tests/tck/connections/relationship-properties.test.ts index 0474f2fc12..571aa2a90d 100644 --- a/packages/graphql/tests/tck/connections/relationship-properties.test.ts +++ b/packages/graphql/tests/tck/connections/relationship-properties.test.ts @@ -69,11 +69,11 @@ describe("Relationship Properties Cypher", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WITH { screenTime: this0.screenTime, node: { name: this1.name } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount @@ -109,11 +109,11 @@ describe("Relationship Properties Cypher", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE this1.name = $param1 WITH { screenTime: this0.screenTime, node: { name: this1.name } } AS edge WITH collect(edge) AS edges @@ -151,11 +151,11 @@ describe("Relationship Properties Cypher", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WITH this0, this1 ORDER BY this0.screenTime DESC WITH { screenTime: this0.screenTime, node: { name: this1.name } } AS edge @@ -200,10 +200,10 @@ describe("Relationship Properties Cypher", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WITH this0, this1 ORDER BY this0.year DESC, this1.name ASC WITH { year: this0.year, node: { name: this1.name } } AS edge @@ -243,10 +243,10 @@ describe("Relationship Properties Cypher", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WITH this0, this1 ORDER BY this1.name ASC, this0.year DESC WITH { year: this0.year, node: { name: this1.name } } AS edge @@ -296,14 +296,14 @@ describe("Relationship Properties Cypher", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) CALL { WITH this1 - MATCH (this1:\`Actor\`)-[this2:\`ACTED_IN\`]->(this3:\`Movie\`) + MATCH (this1:Actor)-[this2:ACTED_IN]->(this3:Movie) WITH { screenTime: this2.screenTime, node: { title: this3.title } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount @@ -360,17 +360,17 @@ describe("Relationship Properties Cypher", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) CALL { WITH this1 - MATCH (this1:\`Actor\`)-[this2:\`ACTED_IN\`]->(this3:\`Movie\`) + MATCH (this1:Actor)-[this2:ACTED_IN]->(this3:Movie) CALL { WITH this3 - MATCH (this3:\`Movie\`)<-[this4:\`ACTED_IN\`]-(this5:\`Actor\`) + MATCH (this3:Movie)<-[this4:ACTED_IN]-(this5:Actor) WITH { screenTime: this4.screenTime, node: { name: this5.name } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount diff --git a/packages/graphql/tests/tck/connections/relationship_properties/connect.test.ts b/packages/graphql/tests/tck/connections/relationship_properties/connect.test.ts index 0370ba6196..13758f3c95 100644 --- a/packages/graphql/tests/tck/connections/relationship_properties/connect.test.ts +++ b/packages/graphql/tests/tck/connections/relationship_properties/connect.test.ts @@ -84,7 +84,7 @@ describe("Relationship Properties Connect Cypher", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_actors_connect0_node - MERGE (this0)<-[this0_actors_connect0_relationship:\`ACTED_IN\`]-(this0_actors_connect0_node) + MERGE (this0)<-[this0_actors_connect0_relationship:ACTED_IN]-(this0_actors_connect0_node) SET this0_actors_connect0_relationship.screenTime = $this0_actors_connect0_relationship_screenTime } } @@ -95,13 +95,13 @@ describe("Relationship Properties Connect Cypher", () => { } CALL { WITH this0 - MATCH (this0)<-[create_this0:\`ACTED_IN\`]-(create_this1:\`Actor\`) + MATCH (this0)<-[create_this0:ACTED_IN]-(create_this1:Actor) WITH { screenTime: create_this0.screenTime, node: { name: create_this1.name } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount RETURN { edges: edges, totalCount: totalCount } AS create_var2 } - RETURN [ this0 { .title, actorsConnection: create_var2 } ] AS data" + RETURN [this0 { .title, actorsConnection: create_var2 }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -160,7 +160,7 @@ describe("Relationship Properties Connect Cypher", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_actors_connect0_node - MERGE (this0)<-[this0_actors_connect0_relationship:\`ACTED_IN\`]-(this0_actors_connect0_node) + MERGE (this0)<-[this0_actors_connect0_relationship:ACTED_IN]-(this0_actors_connect0_node) SET this0_actors_connect0_relationship.screenTime = $this0_actors_connect0_relationship_screenTime } } @@ -171,13 +171,13 @@ describe("Relationship Properties Connect Cypher", () => { } CALL { WITH this0 - MATCH (this0)<-[create_this0:\`ACTED_IN\`]-(create_this1:\`Actor\`) + MATCH (this0)<-[create_this0:ACTED_IN]-(create_this1:Actor) WITH { screenTime: create_this0.screenTime, node: { name: create_this1.name } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount RETURN { edges: edges, totalCount: totalCount } AS create_var2 } - RETURN [ this0 { .title, actorsConnection: create_var2 } ] AS data" + RETURN [this0 { .title, actorsConnection: create_var2 }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -215,7 +215,7 @@ describe("Relationship Properties Connect Cypher", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 WITH this CALL { @@ -228,7 +228,7 @@ describe("Relationship Properties Connect Cypher", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_actors0_node - MERGE (this)<-[this_connect_actors0_relationship:\`ACTED_IN\`]-(this_connect_actors0_node) + MERGE (this)<-[this_connect_actors0_relationship:ACTED_IN]-(this_connect_actors0_node) SET this_connect_actors0_relationship.screenTime = $this_connect_actors0_relationship_screenTime } } @@ -238,7 +238,7 @@ describe("Relationship Properties Connect Cypher", () => { WITH * CALL { WITH this - MATCH (this)<-[update_this0:\`ACTED_IN\`]-(update_this1:\`Actor\`) + MATCH (this)<-[update_this0:ACTED_IN]-(update_this1:Actor) WITH { screenTime: update_this0.screenTime, node: { name: update_this1.name } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount @@ -284,7 +284,7 @@ describe("Relationship Properties Connect Cypher", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 WITH this CALL { @@ -298,7 +298,7 @@ describe("Relationship Properties Connect Cypher", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_actors0_node - MERGE (this)<-[this_connect_actors0_relationship:\`ACTED_IN\`]-(this_connect_actors0_node) + MERGE (this)<-[this_connect_actors0_relationship:ACTED_IN]-(this_connect_actors0_node) SET this_connect_actors0_relationship.screenTime = $this_connect_actors0_relationship_screenTime } } @@ -308,7 +308,7 @@ describe("Relationship Properties Connect Cypher", () => { WITH * CALL { WITH this - MATCH (this)<-[update_this0:\`ACTED_IN\`]-(update_this1:\`Actor\`) + MATCH (this)<-[update_this0:ACTED_IN]-(update_this1:Actor) WITH { screenTime: update_this0.screenTime, node: { name: update_this1.name } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount diff --git a/packages/graphql/tests/tck/connections/relationship_properties/create.test.ts b/packages/graphql/tests/tck/connections/relationship_properties/create.test.ts index fd0318c2c1..03c418b43e 100644 --- a/packages/graphql/tests/tck/connections/relationship_properties/create.test.ts +++ b/packages/graphql/tests/tck/connections/relationship_properties/create.test.ts @@ -80,7 +80,7 @@ describe("Relationship Properties Create Cypher", () => { "UNWIND $create_param0 AS create_var4 CALL { WITH create_var4 - CREATE (create_this0:\`Movie\`) + CREATE (create_this0:Movie) SET create_this0.title = create_var4.title WITH create_this0, create_var4 @@ -88,10 +88,10 @@ describe("Relationship Properties Create Cypher", () => { WITH create_this0, create_var4 UNWIND create_var4.actors.create AS create_var5 WITH create_var5.node AS create_var6, create_var5.edge AS create_var7, create_this0 - CREATE (create_this8:\`Actor\`) + CREATE (create_this8:Actor) SET create_this8.name = create_var6.name - MERGE (create_this0)<-[create_this9:\`ACTED_IN\`]-(create_this8) + MERGE (create_this0)<-[create_this9:ACTED_IN]-(create_this8) SET create_this9.screenTime = create_var7.screenTime RETURN collect(NULL) AS create_var10 @@ -100,7 +100,7 @@ describe("Relationship Properties Create Cypher", () => { } CALL { WITH create_this0 - MATCH (create_this0:\`Movie\`)<-[create_this1:\`ACTED_IN\`]-(create_this2:\`Actor\`) + MATCH (create_this0:Movie)<-[create_this1:ACTED_IN]-(create_this2:Actor) WITH { screenTime: create_this1.screenTime, node: { name: create_this2.name } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount diff --git a/packages/graphql/tests/tck/connections/relationship_properties/update.test.ts b/packages/graphql/tests/tck/connections/relationship_properties/update.test.ts index d5eef95685..54ad13352d 100644 --- a/packages/graphql/tests/tck/connections/relationship_properties/update.test.ts +++ b/packages/graphql/tests/tck/connections/relationship_properties/update.test.ts @@ -67,12 +67,12 @@ describe("Cypher -> Connections -> Relationship Properties -> Update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 WITH this CALL { WITH this - MATCH (this)<-[this_acted_in0_relationship:\`ACTED_IN\`]-(this_actors0:Actor) + MATCH (this)<-[this_acted_in0_relationship:ACTED_IN]-(this_actors0:Actor) WHERE this_actors0.name = $updateMovies_args_update_actors0_where_this_actors0param0 SET this_acted_in0_relationship.screenTime = $updateMovies.args.update.actors[0].update.edge.screenTime RETURN count(*) AS update_this_actors0 @@ -136,12 +136,12 @@ describe("Cypher -> Connections -> Relationship Properties -> Update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 WITH this CALL { WITH this - MATCH (this)<-[this_acted_in0_relationship:\`ACTED_IN\`]-(this_actors0:Actor) + MATCH (this)<-[this_acted_in0_relationship:ACTED_IN]-(this_actors0:Actor) WHERE this_actors0.name = $updateMovies_args_update_actors0_where_this_actors0param0 SET this_acted_in0_relationship.screenTime = $updateMovies.args.update.actors[0].update.edge.screenTime SET this_actors0.name = $this_update_actors0_name diff --git a/packages/graphql/tests/tck/connections/sort.test.ts b/packages/graphql/tests/tck/connections/sort.test.ts index 63ce83a82d..e2da723b9d 100644 --- a/packages/graphql/tests/tck/connections/sort.test.ts +++ b/packages/graphql/tests/tck/connections/sort.test.ts @@ -72,7 +72,7 @@ describe("Relationship Properties Cypher", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WITH collect(this) AS edges WITH edges, size(edges) AS totalCount UNWIND edges AS this @@ -82,7 +82,7 @@ describe("Relationship Properties Cypher", () => { LIMIT $param0 CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WITH { node: { name: this1.name } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount diff --git a/packages/graphql/tests/tck/connections/unions.test.ts b/packages/graphql/tests/tck/connections/unions.test.ts index a8b99224af..624a1a96a4 100644 --- a/packages/graphql/tests/tck/connections/unions.test.ts +++ b/packages/graphql/tests/tck/connections/unions.test.ts @@ -80,17 +80,17 @@ describe("Cypher -> Connections -> Unions", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Author\`) + "MATCH (this:Author) CALL { WITH this CALL { WITH this - MATCH (this)-[this0:\`WROTE\`]->(this1:\`Book\`) + MATCH (this)-[this0:WROTE]->(this1:Book) WITH { words: this0.words, node: { __resolveType: \\"Book\\", __id: id(this1), title: this1.title } } AS edge RETURN edge UNION WITH this - MATCH (this)-[this2:\`WROTE\`]->(this3:\`Journal\`) + MATCH (this)-[this2:WROTE]->(this3:Journal) WITH { words: this2.words, node: { __resolveType: \\"Journal\\", __id: id(this3), subject: this3.subject } } AS edge RETURN edge } @@ -134,18 +134,18 @@ describe("Cypher -> Connections -> Unions", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Author\`) + "MATCH (this:Author) CALL { WITH this CALL { WITH this - MATCH (this)-[this0:\`WROTE\`]->(this1:\`Book\`) + MATCH (this)-[this0:WROTE]->(this1:Book) WHERE this1.title = $param0 WITH { words: this0.words, node: { __resolveType: \\"Book\\", __id: id(this1), title: this1.title } } AS edge RETURN edge UNION WITH this - MATCH (this)-[this2:\`WROTE\`]->(this3:\`Journal\`) + MATCH (this)-[this2:WROTE]->(this3:Journal) WHERE this3.subject = $param1 WITH { words: this2.words, node: { __resolveType: \\"Journal\\", __id: id(this3), subject: this3.subject } } AS edge RETURN edge @@ -192,18 +192,18 @@ describe("Cypher -> Connections -> Unions", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Author\`) + "MATCH (this:Author) CALL { WITH this CALL { WITH this - MATCH (this)-[this0:\`WROTE\`]->(this1:\`Book\`) + MATCH (this)-[this0:WROTE]->(this1:Book) WHERE this0.words = $param0 WITH { words: this0.words, node: { __resolveType: \\"Book\\", __id: id(this1), title: this1.title } } AS edge RETURN edge UNION WITH this - MATCH (this)-[this2:\`WROTE\`]->(this3:\`Journal\`) + MATCH (this)-[this2:WROTE]->(this3:Journal) WHERE this2.words = $param1 WITH { words: this2.words, node: { __resolveType: \\"Journal\\", __id: id(this3), subject: this3.subject } } AS edge RETURN edge @@ -259,18 +259,18 @@ describe("Cypher -> Connections -> Unions", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Author\`) + "MATCH (this:Author) CALL { WITH this CALL { WITH this - MATCH (this)-[this0:\`WROTE\`]->(this1:\`Book\`) + MATCH (this)-[this0:WROTE]->(this1:Book) WHERE (this1.title = $param0 AND this0.words = $param1) WITH { words: this0.words, node: { __resolveType: \\"Book\\", __id: id(this1), title: this1.title } } AS edge RETURN edge UNION WITH this - MATCH (this)-[this2:\`WROTE\`]->(this3:\`Journal\`) + MATCH (this)-[this2:WROTE]->(this3:Journal) WHERE (this3.subject = $param2 AND this2.words = $param3) WITH { words: this2.words, node: { __resolveType: \\"Journal\\", __id: id(this3), subject: this3.subject } } AS edge RETURN edge @@ -323,17 +323,17 @@ describe("Cypher -> Connections -> Unions", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Author\`) + "MATCH (this:Author) CALL { WITH this CALL { WITH this - MATCH (this)-[this0:\`WROTE\`]->(this1:\`Book\`) + MATCH (this)-[this0:WROTE]->(this1:Book) WITH { words: this0.words, node: { __resolveType: \\"Book\\", __id: id(this1), title: this1.title } } AS edge RETURN edge UNION WITH this - MATCH (this)-[this2:\`WROTE\`]->(this3:\`Journal\`) + MATCH (this)-[this2:WROTE]->(this3:Journal) WITH { words: this2.words, node: { __resolveType: \\"Journal\\", __id: id(this3), subject: this3.subject } } AS edge RETURN edge } diff --git a/packages/graphql/tests/tck/directives/alias.test.ts b/packages/graphql/tests/tck/directives/alias.test.ts index d803ff0567..58d1e4daf3 100644 --- a/packages/graphql/tests/tck/directives/alias.test.ts +++ b/packages/graphql/tests/tck/directives/alias.test.ts @@ -67,10 +67,10 @@ describe("Cypher alias directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this - MATCH (this)-[this0:\`ACTED_IN\`]->(this1:\`Movie\`) + MATCH (this)-[this0:ACTED_IN]->(this1:Movie) WITH this1 { .title, rating: this1.ratingPropInDb } AS this1 RETURN collect(this1) AS var2 } @@ -103,10 +103,10 @@ describe("Cypher alias directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this - MATCH (this)-[this0:\`ACTED_IN\`]->(this1:\`Movie\`) + MATCH (this)-[this0:ACTED_IN]->(this1:Movie) WITH { character: this0.characterPropInDb, screenTime: this0.screenTime, node: { title: this1.title, rating: this1.ratingPropInDb } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount @@ -163,7 +163,7 @@ describe("Cypher alias directive", () => { "UNWIND $create_param0 AS create_var7 CALL { WITH create_var7 - CREATE (create_this0:\`Actor\`) + CREATE (create_this0:Actor) SET create_this0.name = create_var7.name, create_this0.cityPropInDb = create_var7.city @@ -172,11 +172,11 @@ describe("Cypher alias directive", () => { WITH create_this0, create_var7 UNWIND create_var7.actedIn.create AS create_var8 WITH create_var8.node AS create_var9, create_var8.edge AS create_var10, create_this0 - CREATE (create_this11:\`Movie\`) + CREATE (create_this11:Movie) SET create_this11.title = create_var9.title, create_this11.ratingPropInDb = create_var9.rating - MERGE (create_this0)-[create_this12:\`ACTED_IN\`]->(create_this11) + MERGE (create_this0)-[create_this12:ACTED_IN]->(create_this11) SET create_this12.characterPropInDb = create_var10.character, create_this12.screenTime = create_var10.screenTime @@ -186,13 +186,13 @@ describe("Cypher alias directive", () => { } CALL { WITH create_this0 - MATCH (create_this0)-[create_this1:\`ACTED_IN\`]->(create_this2:\`Movie\`) + MATCH (create_this0)-[create_this1:ACTED_IN]->(create_this2:Movie) WITH create_this2 { .title, rating: create_this2.ratingPropInDb } AS create_this2 RETURN collect(create_this2) AS create_var3 } CALL { WITH create_this0 - MATCH (create_this0:\`Actor\`)-[create_this4:\`ACTED_IN\`]->(create_this5:\`Movie\`) + MATCH (create_this0:Actor)-[create_this4:ACTED_IN]->(create_this5:Movie) WITH { character: create_this4.characterPropInDb, screenTime: create_this4.screenTime, node: { title: create_this5.title, rating: create_this5.ratingPropInDb } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount diff --git a/packages/graphql/tests/tck/directives/authorization/arguments/allow/allow.test.ts b/packages/graphql/tests/tck/directives/authorization/arguments/allow/allow.test.ts index 4038104adb..57fb9eb823 100644 --- a/packages/graphql/tests/tck/directives/authorization/arguments/allow/allow.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/arguments/allow/allow.test.ts @@ -118,7 +118,7 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN this { .id } AS this" @@ -153,7 +153,7 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH * @@ -193,13 +193,13 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { WITH this - MATCH (this)-[this0:\`HAS_POST\`]->(this1:\`Post\`) - OPTIONAL MATCH (this1)<-[:\`HAS_POST\`]-(this2:\`User\`) + MATCH (this)-[this0:HAS_POST]->(this1:Post) + OPTIONAL MATCH (this1)<-[:HAS_POST]-(this2:User) WITH *, count(this2) AS creatorCount WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (creatorCount <> 0 AND this2.id = coalesce($jwt.sub, $jwtDefault))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) @@ -240,14 +240,14 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) - OPTIONAL MATCH (this)<-[:\`HAS_POST\`]-(this0:\`User\`) + "MATCH (this:Post) + OPTIONAL MATCH (this)<-[:HAS_POST]-(this0:User) WITH *, count(this0) AS creatorCount WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (creatorCount <> 0 AND this0.id = coalesce($jwt.sub, $jwtDefault))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { WITH this - MATCH (this)<-[this1:\`HAS_POST\`]-(this2:\`User\`) + MATCH (this)<-[this1:HAS_POST]-(this2:User) WHERE (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this2.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this2.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH this2 { .password } AS this2 RETURN head(collect(this2)) AS var3 @@ -289,20 +289,20 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE (this.id = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) CALL { WITH this - MATCH (this)-[this0:\`HAS_POST\`]->(this1:\`Post\`) - OPTIONAL MATCH (this1)<-[:\`HAS_POST\`]-(this2:\`User\`) + MATCH (this)-[this0:HAS_POST]->(this1:Post) + OPTIONAL MATCH (this1)<-[:HAS_POST]-(this2:User) WITH *, count(this2) AS creatorCount WITH * WHERE (this1.id = $param4 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (creatorCount <> 0 AND this2.id = coalesce($jwt.sub, $jwtDefault))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) CALL { WITH this1 - MATCH (this1)-[this3:\`HAS_COMMENT\`]->(this4:\`Comment\`) - OPTIONAL MATCH (this4)<-[:\`HAS_COMMENT\`]-(this5:\`User\`) + MATCH (this1)-[this3:HAS_COMMENT]->(this4:Comment) + OPTIONAL MATCH (this4)<-[:HAS_COMMENT]-(this5:User) WITH *, count(this5) AS creatorCount WITH * WHERE (this4.id = $param5 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (creatorCount <> 0 AND this5.id = coalesce($jwt.sub, $jwtDefault))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) @@ -349,7 +349,7 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE (this.id = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) SET this.id = $this_update_id @@ -390,7 +390,7 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE (this.id = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH this @@ -433,15 +433,15 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) - OPTIONAL MATCH (this)<-[:\`HAS_POST\`]-(this0:\`User\`) + "MATCH (this:Post) + OPTIONAL MATCH (this)<-[:HAS_POST]-(this0:User) WITH *, count(this0) AS creatorCount WITH * WHERE (this.id = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (creatorCount <> 0 AND this0.id = coalesce($jwt.sub, $jwtDefault))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH this CALL { WITH this - MATCH (this)<-[this_has_post0_relationship:\`HAS_POST\`]-(this_creator0:User) + MATCH (this)<-[this_has_post0_relationship:HAS_POST]-(this_creator0:User) WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this_creator0.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) SET this_creator0.id = $this_update_creator0_id RETURN count(*) AS update_this_creator0 @@ -449,7 +449,7 @@ describe("Cypher Auth Allow", () => { WITH * CALL { WITH this - MATCH (this)<-[this_creator_User_unique:\`HAS_POST\`]-(:User) + MATCH (this)<-[this_creator_User_unique:HAS_POST]-(:User) WITH count(this_creator_User_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDPost.creator required exactly once', [0]) RETURN c AS this_creator_User_unique_ignored @@ -494,15 +494,15 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) - OPTIONAL MATCH (this)<-[:\`HAS_POST\`]-(this0:\`User\`) + "MATCH (this:Post) + OPTIONAL MATCH (this)<-[:HAS_POST]-(this0:User) WITH *, count(this0) AS creatorCount WITH * WHERE (this.id = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (creatorCount <> 0 AND this0.id = coalesce($jwt.sub, $jwtDefault))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH this CALL { WITH this - MATCH (this)<-[this_has_post0_relationship:\`HAS_POST\`]-(this_creator0:User) + MATCH (this)<-[this_has_post0_relationship:HAS_POST]-(this_creator0:User) WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this_creator0.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this, this_creator0 WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this_creator0.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) @@ -512,7 +512,7 @@ describe("Cypher Auth Allow", () => { WITH * CALL { WITH this - MATCH (this)<-[this_creator_User_unique:\`HAS_POST\`]-(:User) + MATCH (this)<-[this_creator_User_unique:HAS_POST]-(:User) WITH count(this_creator_User_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDPost.creator required exactly once', [0]) RETURN c AS this_creator_User_unique_ignored @@ -552,7 +552,7 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE (this.id = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) DETACH DELETE this" @@ -588,15 +588,15 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE (this.id = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) - OPTIONAL MATCH (this_posts0)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this_posts0)<-[:HAS_POST]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WITH * CALL { WITH * - OPTIONAL MATCH (this)-[this_posts0_relationship:\`HAS_POST\`]->(this_posts0:Post) + OPTIONAL MATCH (this)-[this_posts0_relationship:HAS_POST]->(this_posts0:Post) WHERE this_posts0.id = $this_deleteUsers_args_delete_posts0_where_this_posts0param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this_posts0_relationship, collect(DISTINCT this_posts0) AS this_posts0_to_delete CALL { @@ -656,14 +656,14 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE (this.id = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_disconnect_posts0_rel:\`HAS_POST\`]->(this_disconnect_posts0:Post) - OPTIONAL MATCH (this_disconnect_posts0)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this)-[this_disconnect_posts0_rel:HAS_POST]->(this_disconnect_posts0:Post) + OPTIONAL MATCH (this_disconnect_posts0)<-[:HAS_POST]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WHERE this_disconnect_posts0.id = $updateUsers_args_disconnect_posts0_where_Post_this_disconnect_posts0param0 AND (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) CALL { @@ -732,18 +732,18 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Comment\`) - OPTIONAL MATCH (this)<-[:\`HAS_COMMENT\`]-(this0:\`User\`) + "MATCH (this:Comment) + OPTIONAL MATCH (this)<-[:HAS_COMMENT]-(this0:User) WITH *, count(this0) AS creatorCount WITH * WHERE (this.id = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (creatorCount <> 0 AND this0.id = coalesce($jwt.sub, $jwtDefault))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH this CALL { WITH this - OPTIONAL MATCH (this)<-[this_post0_disconnect0_rel:\`HAS_COMMENT\`]-(this_post0_disconnect0:Post) - OPTIONAL MATCH (this)<-[:\`HAS_COMMENT\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this)<-[this_post0_disconnect0_rel:HAS_COMMENT]-(this_post0_disconnect0:Post) + OPTIONAL MATCH (this)<-[:HAS_COMMENT]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount - OPTIONAL MATCH (this_post0_disconnect0)<-[:\`HAS_POST\`]-(authorization_this1:\`User\`) + OPTIONAL MATCH (this_post0_disconnect0)<-[:HAS_POST]-(authorization_this1:User) WITH *, count(authorization_this1) AS creatorCount WHERE (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this1.id = coalesce($jwt.sub, $jwtDefault))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) CALL { @@ -754,8 +754,8 @@ describe("Cypher Auth Allow", () => { } CALL { WITH this, this_post0_disconnect0 - OPTIONAL MATCH (this_post0_disconnect0)<-[this_post0_disconnect0_creator0_rel:\`HAS_POST\`]-(this_post0_disconnect0_creator0:User) - OPTIONAL MATCH (this_post0_disconnect0)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this_post0_disconnect0)<-[this_post0_disconnect0_creator0_rel:HAS_POST]-(this_post0_disconnect0_creator0:User) + OPTIONAL MATCH (this_post0_disconnect0)<-[:HAS_POST]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WHERE this_post0_disconnect0_creator0.id = $updateComments_args_update_post_disconnect_disconnect_creator_where_User_this_post0_disconnect0_creator0param0 AND (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this_post0_disconnect0_creator0.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) CALL { @@ -771,14 +771,14 @@ describe("Cypher Auth Allow", () => { WITH * CALL { WITH this - MATCH (this)<-[this_creator_User_unique:\`HAS_COMMENT\`]-(:User) + MATCH (this)<-[this_creator_User_unique:HAS_COMMENT]-(:User) WITH count(this_creator_User_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDComment.creator required exactly once', [0]) RETURN c AS this_creator_User_unique_ignored } CALL { WITH this - MATCH (this)<-[this_post_Post_unique:\`HAS_COMMENT\`]-(:Post) + MATCH (this)<-[this_post_Post_unique:HAS_COMMENT]-(:Post) WITH count(this_post_Post_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDComment.post required exactly once', [0]) RETURN c AS this_post_Post_unique_ignored @@ -839,14 +839,14 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE (this.id = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH this CALL { WITH this OPTIONAL MATCH (this_connect_posts0_node:Post) - OPTIONAL MATCH (this_connect_posts0_node)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this_connect_posts0_node)<-[:HAS_POST]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WHERE this_connect_posts0_node.id = $this_connect_posts0_node_param0 AND (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) CALL { @@ -856,7 +856,7 @@ describe("Cypher Auth Allow", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_posts0_node - MERGE (this)-[:\`HAS_POST\`]->(this_connect_posts0_node) + MERGE (this)-[:HAS_POST]->(this_connect_posts0_node) } } WITH this, this_connect_posts0_node diff --git a/packages/graphql/tests/tck/directives/authorization/arguments/allow/interface-relationships/implementation-allow.test.ts b/packages/graphql/tests/tck/directives/authorization/arguments/allow/interface-relationships/implementation-allow.test.ts index 272d5ab1a9..042eccb735 100644 --- a/packages/graphql/tests/tck/directives/authorization/arguments/allow/interface-relationships/implementation-allow.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/arguments/allow/interface-relationships/implementation-allow.test.ts @@ -95,18 +95,18 @@ describe("@auth allow on specific interface implementation", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) CALL { WITH this CALL { WITH * - MATCH (this)-[this0:\`HAS_CONTENT\`]->(this1:\`Comment\`) + MATCH (this)-[this0:HAS_CONTENT]->(this1:Comment) WITH this1 { __resolveType: \\"Comment\\", __id: id(this), .id, .content } AS this1 RETURN this1 AS var2 UNION WITH * - MATCH (this)-[this3:\`HAS_CONTENT\`]->(this4:\`Post\`) - OPTIONAL MATCH (this4)<-[:\`HAS_CONTENT\`]-(this5:\`User\`) + MATCH (this)-[this3:HAS_CONTENT]->(this4:Post) + OPTIONAL MATCH (this4)<-[:HAS_CONTENT]-(this5:User) WITH *, count(this5) AS creatorCount WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (creatorCount <> 0 AND this5.id = coalesce($jwt.sub, $jwtDefault))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) @@ -155,26 +155,26 @@ describe("@auth allow on specific interface implementation", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WHERE this.id = $param0 CALL { WITH this CALL { WITH * - MATCH (this)-[this0:\`HAS_CONTENT\`]->(this1:\`Comment\`) + MATCH (this)-[this0:HAS_CONTENT]->(this1:Comment) WHERE this1.id = $param1 WITH this1 { __resolveType: \\"Comment\\", __id: id(this) } AS this1 RETURN this1 AS var2 UNION WITH * - MATCH (this)-[this3:\`HAS_CONTENT\`]->(this4:\`Post\`) - OPTIONAL MATCH (this4)<-[:\`HAS_CONTENT\`]-(this5:\`User\`) + MATCH (this)-[this3:HAS_CONTENT]->(this4:Post) + OPTIONAL MATCH (this4)<-[:HAS_CONTENT]-(this5:User) WITH *, count(this5) AS creatorCount WITH * WHERE (this4.id = $param2 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (creatorCount <> 0 AND this5.id = coalesce($jwt.sub, $jwtDefault))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) CALL { WITH this4 - MATCH (this4)-[this6:\`HAS_COMMENT\`]->(this7:\`Comment\`) + MATCH (this4)-[this6:HAS_COMMENT]->(this7:Comment) WHERE this7.id = $param6 WITH this7 { .content } AS this7 RETURN collect(this7) AS var8 @@ -226,7 +226,7 @@ describe("@auth allow on specific interface implementation", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WHERE this.id = $param0 WITH this CALL { @@ -234,19 +234,19 @@ describe("@auth allow on specific interface implementation", () => { WITH this CALL { WITH this - MATCH (this)-[this_has_content0_relationship:\`HAS_CONTENT\`]->(this_content0:Comment) + MATCH (this)-[this_has_content0_relationship:HAS_CONTENT]->(this_content0:Comment) SET this_content0.id = $this_update_content0_id WITH this, this_content0 CALL { WITH this_content0 - MATCH (this_content0)<-[this_content0_creator_User_unique:\`HAS_CONTENT\`]-(:User) + MATCH (this_content0)<-[this_content0_creator_User_unique:HAS_CONTENT]-(:User) WITH count(this_content0_creator_User_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDComment.creator required exactly once', [0]) RETURN c AS this_content0_creator_User_unique_ignored } CALL { WITH this_content0 - MATCH (this_content0)<-[this_content0_post_Post_unique:\`HAS_COMMENT\`]-(:Post) + MATCH (this_content0)<-[this_content0_post_Post_unique:HAS_COMMENT]-(:Post) WITH count(this_content0_post_Post_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDComment.post required exactly once', [0]) RETURN c AS this_content0_post_Post_unique_ignored @@ -260,15 +260,15 @@ describe("@auth allow on specific interface implementation", () => { WITH this CALL { WITH this - MATCH (this)-[this_has_content0_relationship:\`HAS_CONTENT\`]->(this_content0:Post) - OPTIONAL MATCH (this_content0)<-[:\`HAS_CONTENT\`]-(authorization_this0:\`User\`) + MATCH (this)-[this_has_content0_relationship:HAS_CONTENT]->(this_content0:Post) + OPTIONAL MATCH (this_content0)<-[:HAS_CONTENT]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) SET this_content0.id = $this_update_content0_id WITH this, this_content0 CALL { WITH this_content0 - MATCH (this_content0)<-[this_content0_creator_User_unique:\`HAS_CONTENT\`]-(:User) + MATCH (this_content0)<-[this_content0_creator_User_unique:HAS_CONTENT]-(:User) WITH count(this_content0_creator_User_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDPost.creator required exactly once', [0]) RETURN c AS this_content0_creator_User_unique_ignored @@ -282,13 +282,13 @@ describe("@auth allow on specific interface implementation", () => { WITH this CALL { WITH * - MATCH (this)-[update_this0:\`HAS_CONTENT\`]->(update_this1:\`Comment\`) + MATCH (this)-[update_this0:HAS_CONTENT]->(update_this1:Comment) WITH update_this1 { __resolveType: \\"Comment\\", __id: id(this), .id } AS update_this1 RETURN update_this1 AS update_var2 UNION WITH * - MATCH (this)-[update_this3:\`HAS_CONTENT\`]->(update_this4:\`Post\`) - OPTIONAL MATCH (update_this4)<-[:\`HAS_CONTENT\`]-(update_this5:\`User\`) + MATCH (this)-[update_this3:HAS_CONTENT]->(update_this4:Post) + OPTIONAL MATCH (update_this4)<-[:HAS_CONTENT]-(update_this5:User) WITH *, count(update_this5) AS creatorCount WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (creatorCount <> 0 AND update_this5.id = coalesce($jwt.sub, $jwtDefault))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) @@ -333,12 +333,12 @@ describe("@auth allow on specific interface implementation", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WHERE this.id = $param0 WITH * CALL { WITH * - OPTIONAL MATCH (this)-[this_content_Comment0_relationship:\`HAS_CONTENT\`]->(this_content_Comment0:Comment) + OPTIONAL MATCH (this)-[this_content_Comment0_relationship:HAS_CONTENT]->(this_content_Comment0:Comment) WHERE this_content_Comment0.id = $this_deleteUsers_args_delete_content0_where_this_content_Comment0param0 WITH this_content_Comment0_relationship, collect(DISTINCT this_content_Comment0) AS this_content_Comment0_to_delete CALL { @@ -347,12 +347,12 @@ describe("@auth allow on specific interface implementation", () => { DETACH DELETE x } } - OPTIONAL MATCH (this_content_Post0)<-[:\`HAS_CONTENT\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this_content_Post0)<-[:HAS_CONTENT]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WITH * CALL { WITH * - OPTIONAL MATCH (this)-[this_content_Post0_relationship:\`HAS_CONTENT\`]->(this_content_Post0:Post) + OPTIONAL MATCH (this)-[this_content_Post0_relationship:HAS_CONTENT]->(this_content_Post0:Post) WHERE this_content_Post0.id = $this_deleteUsers_args_delete_content0_where_this_content_Post0param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this_content_Post0_relationship, collect(DISTINCT this_content_Post0) AS this_content_Post0_to_delete CALL { @@ -413,12 +413,12 @@ describe("@auth allow on specific interface implementation", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WHERE this.id = $param0 WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_disconnect_content0_rel:\`HAS_CONTENT\`]->(this_disconnect_content0:Comment) + OPTIONAL MATCH (this)-[this_disconnect_content0_rel:HAS_CONTENT]->(this_disconnect_content0:Comment) WHERE this_disconnect_content0.id = $updateUsers_args_disconnect_content0_where_Comment_this_disconnect_content0param0 CALL { WITH this_disconnect_content0, this_disconnect_content0_rel, this @@ -430,8 +430,8 @@ describe("@auth allow on specific interface implementation", () => { } CALL { WITH this - OPTIONAL MATCH (this)-[this_disconnect_content0_rel:\`HAS_CONTENT\`]->(this_disconnect_content0:Post) - OPTIONAL MATCH (this_disconnect_content0)<-[:\`HAS_CONTENT\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this)-[this_disconnect_content0_rel:HAS_CONTENT]->(this_disconnect_content0:Post) + OPTIONAL MATCH (this_disconnect_content0)<-[:HAS_CONTENT]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WHERE this_disconnect_content0.id = $updateUsers_args_disconnect_content0_where_Post_this_disconnect_content0param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { @@ -504,12 +504,12 @@ describe("@auth allow on specific interface implementation", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WHERE this.id = $param0 WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_disconnect_content0_rel:\`HAS_CONTENT\`]->(this_disconnect_content0:Comment) + OPTIONAL MATCH (this)-[this_disconnect_content0_rel:HAS_CONTENT]->(this_disconnect_content0:Comment) WHERE this_disconnect_content0.id = $updateUsers_args_disconnect_content0_where_Comment_this_disconnect_content0param0 CALL { WITH this_disconnect_content0, this_disconnect_content0_rel, this @@ -521,8 +521,8 @@ describe("@auth allow on specific interface implementation", () => { } CALL { WITH this - OPTIONAL MATCH (this)-[this_disconnect_content0_rel:\`HAS_CONTENT\`]->(this_disconnect_content0:Post) - OPTIONAL MATCH (this_disconnect_content0)<-[:\`HAS_CONTENT\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this)-[this_disconnect_content0_rel:HAS_CONTENT]->(this_disconnect_content0:Post) + OPTIONAL MATCH (this_disconnect_content0)<-[:HAS_CONTENT]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WHERE this_disconnect_content0.id = $updateUsers_args_disconnect_content0_where_Post_this_disconnect_content0param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { @@ -533,8 +533,8 @@ describe("@auth allow on specific interface implementation", () => { } CALL { WITH this, this_disconnect_content0 - OPTIONAL MATCH (this_disconnect_content0)-[this_disconnect_content0_comments0_rel:\`HAS_COMMENT\`]->(this_disconnect_content0_comments0:Comment) - OPTIONAL MATCH (this_disconnect_content0)<-[:\`HAS_CONTENT\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this_disconnect_content0)-[this_disconnect_content0_comments0_rel:HAS_COMMENT]->(this_disconnect_content0_comments0:Comment) + OPTIONAL MATCH (this_disconnect_content0)<-[:HAS_CONTENT]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WHERE this_disconnect_content0_comments0.id = $updateUsers_args_disconnect_content0_disconnect__on_Post0_comments0_where_Comment_this_disconnect_content0_comments0param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { @@ -619,7 +619,7 @@ describe("@auth allow on specific interface implementation", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WHERE this.id = $param0 WITH this CALL { @@ -633,7 +633,7 @@ describe("@auth allow on specific interface implementation", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_content0_node - MERGE (this)-[:\`HAS_CONTENT\`]->(this_connect_content0_node) + MERGE (this)-[:HAS_CONTENT]->(this_connect_content0_node) } } WITH this, this_connect_content0_node @@ -642,7 +642,7 @@ describe("@auth allow on specific interface implementation", () => { CALL { WITH this OPTIONAL MATCH (this_connect_content1_node:Post) - OPTIONAL MATCH (this_connect_content1_node)<-[:\`HAS_CONTENT\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this_connect_content1_node)<-[:HAS_CONTENT]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WHERE this_connect_content1_node.id = $this_connect_content1_node_param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { @@ -652,7 +652,7 @@ describe("@auth allow on specific interface implementation", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_content1_node - MERGE (this)-[:\`HAS_CONTENT\`]->(this_connect_content1_node) + MERGE (this)-[:HAS_CONTENT]->(this_connect_content1_node) } } WITH this, this_connect_content1_node diff --git a/packages/graphql/tests/tck/directives/authorization/arguments/bind/bind.test.ts b/packages/graphql/tests/tck/directives/authorization/arguments/bind/bind.test.ts index 4e4c5d1900..99099cae51 100644 --- a/packages/graphql/tests/tck/directives/authorization/arguments/bind/bind.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/arguments/bind/bind.test.ts @@ -94,7 +94,7 @@ describe("Cypher Auth Allow", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`User\`) + CREATE (create_this1:User) SET create_this1.id = create_var0.id, create_this1.name = create_var0.name @@ -158,7 +158,7 @@ describe("Cypher Auth Allow", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`User\`) + CREATE (create_this1:User) SET create_this1.id = create_var0.id, create_this1.name = create_var0.name @@ -167,32 +167,32 @@ describe("Cypher Auth Allow", () => { WITH create_this1, create_var0 UNWIND create_var0.posts.create AS create_var2 WITH create_var2.node AS create_var3, create_var2.edge AS create_var4, create_this1 - CREATE (create_this5:\`Post\`) + CREATE (create_this5:Post) SET create_this5.id = create_var3.id - MERGE (create_this1)-[create_this6:\`HAS_POST\`]->(create_this5) + MERGE (create_this1)-[create_this6:HAS_POST]->(create_this5) WITH create_this5, create_var3 CALL { WITH create_this5, create_var3 UNWIND create_var3.creator.create AS create_var7 WITH create_var7.node AS create_var8, create_var7.edge AS create_var9, create_this5 - CREATE (create_this10:\`User\`) + CREATE (create_this10:User) SET create_this10.id = create_var8.id - MERGE (create_this5)<-[create_this11:\`HAS_POST\`]-(create_this10) + MERGE (create_this5)<-[create_this11:HAS_POST]-(create_this10) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND create_this10.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN collect(NULL) AS create_var12 } WITH * - OPTIONAL MATCH (create_this5)<-[:\`HAS_POST\`]-(create_this13:\`User\`) + OPTIONAL MATCH (create_this5)<-[:HAS_POST]-(create_this13:User) WITH *, count(create_this13) AS creatorCount WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (creatorCount <> 0 AND create_this13.id = coalesce($jwt.sub, $jwtDefault))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH create_this5 CALL { WITH create_this5 - MATCH (create_this5)<-[create_this5_creator_User_unique:\`HAS_POST\`]-(:User) + MATCH (create_this5)<-[create_this5_creator_User_unique:HAS_POST]-(:User) WITH count(create_this5_creator_User_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDPost.creator required exactly once', [0]) RETURN c AS create_this5_creator_User_unique_ignored @@ -260,7 +260,7 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WHERE this.id = $param0 SET this.id = $this_update_id WITH this @@ -310,17 +310,17 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WHERE this.id = $param0 WITH this CALL { WITH this - MATCH (this)-[this_has_post0_relationship:\`HAS_POST\`]->(this_posts0:Post) + MATCH (this)-[this_has_post0_relationship:HAS_POST]->(this_posts0:Post) WHERE this_posts0.id = $updateUsers_args_update_posts0_where_this_posts0param0 WITH this, this_posts0 CALL { WITH this, this_posts0 - MATCH (this_posts0)<-[this_posts0_has_post0_relationship:\`HAS_POST\`]-(this_posts0_creator0:User) + MATCH (this_posts0)<-[this_posts0_has_post0_relationship:HAS_POST]-(this_posts0_creator0:User) SET this_posts0_creator0.id = $this_update_posts0_creator0_id WITH this, this_posts0, this_posts0_creator0 WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this_posts0_creator0.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) @@ -329,7 +329,7 @@ describe("Cypher Auth Allow", () => { WITH this, this_posts0 CALL { WITH this_posts0 - MATCH (this_posts0)<-[this_posts0_creator_User_unique:\`HAS_POST\`]-(:User) + MATCH (this_posts0)<-[this_posts0_creator_User_unique:HAS_POST]-(:User) WITH count(this_posts0_creator_User_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDPost.creator required exactly once', [0]) RETURN c AS this_posts0_creator_User_unique_ignored @@ -402,7 +402,7 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) WHERE this.id = $param0 WITH this CALL { @@ -416,12 +416,12 @@ describe("Cypher Auth Allow", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_creator0_node - MERGE (this)<-[:\`HAS_POST\`]-(this_connect_creator0_node) + MERGE (this)<-[:HAS_POST]-(this_connect_creator0_node) } } WITH this, this_connect_creator0_node WITH * - OPTIONAL MATCH (this)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this)<-[:HAS_POST]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WITH * WHERE (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this_connect_creator0_node.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) @@ -431,7 +431,7 @@ describe("Cypher Auth Allow", () => { WITH * CALL { WITH this - MATCH (this)<-[this_creator_User_unique:\`HAS_POST\`]-(:User) + MATCH (this)<-[this_creator_User_unique:HAS_POST]-(:User) WITH count(this_creator_User_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDPost.creator required exactly once', [0]) RETURN c AS this_creator_User_unique_ignored @@ -473,12 +473,12 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) WHERE this.id = $param0 WITH this CALL { WITH this - OPTIONAL MATCH (this)<-[this_disconnect_creator0_rel:\`HAS_POST\`]-(this_disconnect_creator0:User) + OPTIONAL MATCH (this)<-[this_disconnect_creator0_rel:HAS_POST]-(this_disconnect_creator0:User) WHERE this_disconnect_creator0.id = $updatePosts_args_disconnect_creator_where_User_this_disconnect_creator0param0 CALL { WITH this_disconnect_creator0, this_disconnect_creator0_rel, this @@ -487,7 +487,7 @@ describe("Cypher Auth Allow", () => { DELETE this_disconnect_creator0_rel } WITH * - OPTIONAL MATCH (this)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this)<-[:HAS_POST]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WITH * WHERE (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this_disconnect_creator0.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) @@ -497,7 +497,7 @@ describe("Cypher Auth Allow", () => { WITH * CALL { WITH this - MATCH (this)<-[this_creator_User_unique:\`HAS_POST\`]-(:User) + MATCH (this)<-[this_creator_User_unique:HAS_POST]-(:User) WITH count(this_creator_User_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDPost.creator required exactly once', [0]) RETURN c AS this_creator_User_unique_ignored diff --git a/packages/graphql/tests/tck/directives/authorization/arguments/bind/interface-relationships/implementation-bind.test.ts b/packages/graphql/tests/tck/directives/authorization/arguments/bind/interface-relationships/implementation-bind.test.ts index bf26b63d31..2280695412 100644 --- a/packages/graphql/tests/tck/directives/authorization/arguments/bind/interface-relationships/implementation-bind.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/arguments/bind/interface-relationships/implementation-bind.test.ts @@ -130,17 +130,17 @@ describe("Cypher Auth Allow", () => { SET this0_contentPost0_node_creator0_node.id = $this0_contentPost0_node_creator0_node_id WITH this0, this0_contentPost0_node, this0_contentPost0_node_creator0_node WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this0_contentPost0_node_creator0_node.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) - MERGE (this0_contentPost0_node)<-[:\`HAS_CONTENT\`]-(this0_contentPost0_node_creator0_node) + MERGE (this0_contentPost0_node)<-[:HAS_CONTENT]-(this0_contentPost0_node_creator0_node) WITH this0, this0_contentPost0_node - OPTIONAL MATCH (this0_contentPost0_node)<-[:\`HAS_CONTENT\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this0_contentPost0_node)<-[:HAS_CONTENT]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) - MERGE (this0)-[:\`HAS_CONTENT\`]->(this0_contentPost0_node) + MERGE (this0)-[:HAS_CONTENT]->(this0_contentPost0_node) WITH this0, this0_contentPost0_node CALL { WITH this0_contentPost0_node - MATCH (this0_contentPost0_node)<-[this0_contentPost0_node_creator_User_unique:\`HAS_CONTENT\`]-(:User) + MATCH (this0_contentPost0_node)<-[this0_contentPost0_node_creator_User_unique:HAS_CONTENT]-(:User) WITH count(this0_contentPost0_node_creator_User_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDPost.creator required exactly once', [0]) RETURN c AS this0_contentPost0_node_creator_User_unique_ignored @@ -149,7 +149,7 @@ describe("Cypher Auth Allow", () => { WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this0.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN this0 } - RETURN [ this0 { .id } ] AS data" + RETURN [this0 { .id }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -219,12 +219,12 @@ describe("Cypher Auth Allow", () => { SET this0_contentComment0_node_creator0_node.id = $this0_contentComment0_node_creator0_node_id WITH this0, this0_contentComment0_node, this0_contentComment0_node_creator0_node WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this0_contentComment0_node_creator0_node.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) - MERGE (this0_contentComment0_node)<-[:\`HAS_CONTENT\`]-(this0_contentComment0_node_creator0_node) - MERGE (this0)-[:\`HAS_CONTENT\`]->(this0_contentComment0_node) + MERGE (this0_contentComment0_node)<-[:HAS_CONTENT]-(this0_contentComment0_node_creator0_node) + MERGE (this0)-[:HAS_CONTENT]->(this0_contentComment0_node) WITH this0, this0_contentComment0_node CALL { WITH this0_contentComment0_node - MATCH (this0_contentComment0_node)<-[this0_contentComment0_node_creator_User_unique:\`HAS_CONTENT\`]-(:User) + MATCH (this0_contentComment0_node)<-[this0_contentComment0_node_creator_User_unique:HAS_CONTENT]-(:User) WITH count(this0_contentComment0_node_creator_User_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDComment.creator required exactly once', [0]) RETURN c AS this0_contentComment0_node_creator_User_unique_ignored @@ -233,7 +233,7 @@ describe("Cypher Auth Allow", () => { WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this0.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN this0 } - RETURN [ this0 { .id } ] AS data" + RETURN [this0 { .id }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -280,7 +280,7 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WHERE this.id = $param0 WITH this CALL { @@ -288,12 +288,12 @@ describe("Cypher Auth Allow", () => { WITH this CALL { WITH this - MATCH (this)-[this_has_content0_relationship:\`HAS_CONTENT\`]->(this_content0:Comment) + MATCH (this)-[this_has_content0_relationship:HAS_CONTENT]->(this_content0:Comment) WHERE this_content0.id = $updateUsers_args_update_content0_where_this_content0param0 WITH this, this_content0 CALL { WITH this, this_content0 - MATCH (this_content0)<-[this_content0_has_content0_relationship:\`HAS_CONTENT\`]-(this_content0_creator0:User) + MATCH (this_content0)<-[this_content0_has_content0_relationship:HAS_CONTENT]-(this_content0_creator0:User) SET this_content0_creator0.id = $this_update_content0_creator0_id WITH this, this_content0, this_content0_creator0 WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this_content0_creator0.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) @@ -302,7 +302,7 @@ describe("Cypher Auth Allow", () => { WITH this, this_content0 CALL { WITH this_content0 - MATCH (this_content0)<-[this_content0_creator_User_unique:\`HAS_CONTENT\`]-(:User) + MATCH (this_content0)<-[this_content0_creator_User_unique:HAS_CONTENT]-(:User) WITH count(this_content0_creator_User_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDComment.creator required exactly once', [0]) RETURN c AS this_content0_creator_User_unique_ignored @@ -316,26 +316,26 @@ describe("Cypher Auth Allow", () => { WITH this CALL { WITH this - MATCH (this)-[this_has_content0_relationship:\`HAS_CONTENT\`]->(this_content0:Post) + MATCH (this)-[this_has_content0_relationship:HAS_CONTENT]->(this_content0:Post) WHERE this_content0.id = $updateUsers_args_update_content0_where_this_content0param0 WITH this, this_content0 CALL { WITH this, this_content0 - MATCH (this_content0)<-[this_content0_has_content0_relationship:\`HAS_CONTENT\`]-(this_content0_creator0:User) + MATCH (this_content0)<-[this_content0_has_content0_relationship:HAS_CONTENT]-(this_content0_creator0:User) SET this_content0_creator0.id = $this_update_content0_creator0_id WITH this, this_content0, this_content0_creator0 WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this_content0_creator0.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN count(*) AS update_this_content0_creator0 } WITH this, this_content0 - OPTIONAL MATCH (this_content0)<-[:\`HAS_CONTENT\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this_content0)<-[:HAS_CONTENT]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this, this_content0 CALL { WITH this_content0 - MATCH (this_content0)<-[this_content0_creator_User_unique:\`HAS_CONTENT\`]-(:User) + MATCH (this_content0)<-[this_content0_creator_User_unique:HAS_CONTENT]-(:User) WITH count(this_content0_creator_User_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDPost.creator required exactly once', [0]) RETURN c AS this_content0_creator_User_unique_ignored @@ -410,7 +410,7 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WHERE this.id = $param0 WITH this CALL { @@ -424,7 +424,7 @@ describe("Cypher Auth Allow", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_content0_node - MERGE (this)-[:\`HAS_CONTENT\`]->(this_connect_content0_node) + MERGE (this)-[:HAS_CONTENT]->(this_connect_content0_node) } } WITH this, this_connect_content0_node @@ -443,12 +443,12 @@ describe("Cypher Auth Allow", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_content1_node - MERGE (this)-[:\`HAS_CONTENT\`]->(this_connect_content1_node) + MERGE (this)-[:HAS_CONTENT]->(this_connect_content1_node) } } WITH this, this_connect_content1_node WITH * - OPTIONAL MATCH (this_connect_content1_node)<-[:\`HAS_CONTENT\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this_connect_content1_node)<-[:HAS_CONTENT]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WITH * WHERE (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) @@ -496,12 +496,12 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WHERE this.id = $param0 WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_disconnect_content0_rel:\`HAS_CONTENT\`]->(this_disconnect_content0:Comment) + OPTIONAL MATCH (this)-[this_disconnect_content0_rel:HAS_CONTENT]->(this_disconnect_content0:Comment) WHERE this_disconnect_content0.id = $updateUsers_args_disconnect_content0_where_Comment_this_disconnect_content0param0 CALL { WITH this_disconnect_content0, this_disconnect_content0_rel, this @@ -515,7 +515,7 @@ describe("Cypher Auth Allow", () => { } CALL { WITH this - OPTIONAL MATCH (this)-[this_disconnect_content0_rel:\`HAS_CONTENT\`]->(this_disconnect_content0:Post) + OPTIONAL MATCH (this)-[this_disconnect_content0_rel:HAS_CONTENT]->(this_disconnect_content0:Post) WHERE this_disconnect_content0.id = $updateUsers_args_disconnect_content0_where_Post_this_disconnect_content0param0 CALL { WITH this_disconnect_content0, this_disconnect_content0_rel, this @@ -524,7 +524,7 @@ describe("Cypher Auth Allow", () => { DELETE this_disconnect_content0_rel } WITH * - OPTIONAL MATCH (this_disconnect_content0)<-[:\`HAS_CONTENT\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this_disconnect_content0)<-[:HAS_CONTENT]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WITH * WHERE (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) diff --git a/packages/graphql/tests/tck/directives/authorization/arguments/is-authenticated/interface-relationships/implementation-is-authenticated.test.ts b/packages/graphql/tests/tck/directives/authorization/arguments/is-authenticated/interface-relationships/implementation-is-authenticated.test.ts index 53df99e865..da080d4ccf 100644 --- a/packages/graphql/tests/tck/directives/authorization/arguments/is-authenticated/interface-relationships/implementation-is-authenticated.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/arguments/is-authenticated/interface-relationships/implementation-is-authenticated.test.ts @@ -83,7 +83,7 @@ describe("Cypher Auth isAuthenticated", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`Post\`) + CREATE (create_this1:Post) SET create_this1.id = create_var0.id, create_this1.content = create_var0.content @@ -125,7 +125,7 @@ describe("Cypher Auth isAuthenticated", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`Comment\`) + CREATE (create_this1:Comment) SET create_this1.id = create_var0.id, create_this1.content = create_var0.content @@ -164,7 +164,7 @@ describe("Cypher Auth isAuthenticated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) WHERE this.id = $param0 SET this.id = $this_update_id RETURN collect(DISTINCT this { .id }) AS data" @@ -196,7 +196,7 @@ describe("Cypher Auth isAuthenticated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Comment\`) + "MATCH (this:Comment) WHERE this.id = $param0 SET this.id = $this_update_id RETURN collect(DISTINCT this { .id }) AS data" @@ -228,7 +228,7 @@ describe("Cypher Auth isAuthenticated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH this CALL { WITH this @@ -240,7 +240,7 @@ describe("Cypher Auth isAuthenticated", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_content0_node - MERGE (this)-[:\`HAS_CONTENT\`]->(this_connect_content0_node) + MERGE (this)-[:HAS_CONTENT]->(this_connect_content0_node) } } WITH this, this_connect_content0_node @@ -256,7 +256,7 @@ describe("Cypher Auth isAuthenticated", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_content1_node - MERGE (this)-[:\`HAS_CONTENT\`]->(this_connect_content1_node) + MERGE (this)-[:HAS_CONTENT]->(this_connect_content1_node) } } WITH this, this_connect_content1_node @@ -290,11 +290,11 @@ describe("Cypher Auth isAuthenticated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_disconnect_content0_rel:\`HAS_CONTENT\`]->(this_disconnect_content0:Comment) + OPTIONAL MATCH (this)-[this_disconnect_content0_rel:HAS_CONTENT]->(this_disconnect_content0:Comment) CALL { WITH this_disconnect_content0, this_disconnect_content0_rel, this WITH collect(this_disconnect_content0) as this_disconnect_content0, this_disconnect_content0_rel, this @@ -305,7 +305,7 @@ describe("Cypher Auth isAuthenticated", () => { } CALL { WITH this - OPTIONAL MATCH (this)-[this_disconnect_content0_rel:\`HAS_CONTENT\`]->(this_disconnect_content0:Post) + OPTIONAL MATCH (this)-[this_disconnect_content0_rel:HAS_CONTENT]->(this_disconnect_content0:Post) CALL { WITH this_disconnect_content0, this_disconnect_content0_rel, this WITH collect(this_disconnect_content0) as this_disconnect_content0, this_disconnect_content0_rel, this @@ -349,7 +349,7 @@ describe("Cypher Auth isAuthenticated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) + "MATCH (this:Post) DETACH DELETE this" `); @@ -371,7 +371,7 @@ describe("Cypher Auth isAuthenticated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Comment\`) + "MATCH (this:Comment) DETACH DELETE this" `); @@ -393,11 +393,11 @@ describe("Cypher Auth isAuthenticated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * CALL { WITH * - OPTIONAL MATCH (this)-[this_content_Comment0_relationship:\`HAS_CONTENT\`]->(this_content_Comment0:Comment) + OPTIONAL MATCH (this)-[this_content_Comment0_relationship:HAS_CONTENT]->(this_content_Comment0:Comment) WITH this_content_Comment0_relationship, collect(DISTINCT this_content_Comment0) AS this_content_Comment0_to_delete CALL { WITH this_content_Comment0_to_delete @@ -408,7 +408,7 @@ describe("Cypher Auth isAuthenticated", () => { WITH * CALL { WITH * - OPTIONAL MATCH (this)-[this_content_Post0_relationship:\`HAS_CONTENT\`]->(this_content_Post0:Post) + OPTIONAL MATCH (this)-[this_content_Post0_relationship:HAS_CONTENT]->(this_content_Post0:Post) WITH this_content_Post0_relationship, collect(DISTINCT this_content_Post0) AS this_content_Post0_to_delete CALL { WITH this_content_Post0_to_delete diff --git a/packages/graphql/tests/tck/directives/authorization/arguments/is-authenticated/is-authenticated.test.ts b/packages/graphql/tests/tck/directives/authorization/arguments/is-authenticated/is-authenticated.test.ts index 7c1f8a1fe2..22ad4638b7 100644 --- a/packages/graphql/tests/tck/directives/authorization/arguments/is-authenticated/is-authenticated.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/arguments/is-authenticated/is-authenticated.test.ts @@ -83,7 +83,7 @@ describe("Cypher Auth isAuthenticated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) RETURN this { .id, .name } AS this" `); @@ -107,7 +107,7 @@ describe("Cypher Auth isAuthenticated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) RETURN this { .id, .name, .password } AS this" `); @@ -131,7 +131,7 @@ describe("Cypher Auth isAuthenticated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) CALL { WITH this CALL { @@ -168,7 +168,7 @@ describe("Cypher Auth isAuthenticated", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`User\`) + CREATE (create_this1:User) SET create_this1.id = create_var0.id RETURN create_this1 @@ -208,7 +208,7 @@ describe("Cypher Auth isAuthenticated", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`User\`) + CREATE (create_this1:User) SET create_this1.id = create_var0.id, create_this1.password = create_var0.password @@ -247,7 +247,7 @@ describe("Cypher Auth isAuthenticated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WHERE this.id = $param0 SET this.id = $this_update_id RETURN collect(DISTINCT this { .id }) AS data" @@ -279,7 +279,7 @@ describe("Cypher Auth isAuthenticated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WHERE this.id = $param0 SET this.password = $this_update_password RETURN collect(DISTINCT this { .id }) AS data" @@ -311,7 +311,7 @@ describe("Cypher Auth isAuthenticated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH this CALL { WITH this @@ -323,7 +323,7 @@ describe("Cypher Auth isAuthenticated", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_posts0_node - MERGE (this)-[:\`HAS_POST\`]->(this_connect_posts0_node) + MERGE (this)-[:HAS_POST]->(this_connect_posts0_node) } } WITH this, this_connect_posts0_node @@ -357,11 +357,11 @@ describe("Cypher Auth isAuthenticated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_disconnect_posts0_rel:\`HAS_POST\`]->(this_disconnect_posts0:Post) + OPTIONAL MATCH (this)-[this_disconnect_posts0_rel:HAS_POST]->(this_disconnect_posts0:Post) CALL { WITH this_disconnect_posts0, this_disconnect_posts0_rel, this WITH collect(this_disconnect_posts0) as this_disconnect_posts0, this_disconnect_posts0_rel, this @@ -405,7 +405,7 @@ describe("Cypher Auth isAuthenticated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) DETACH DELETE this" `); @@ -427,11 +427,11 @@ describe("Cypher Auth isAuthenticated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * CALL { WITH * - OPTIONAL MATCH (this)-[this_posts0_relationship:\`HAS_POST\`]->(this_posts0:Post) + OPTIONAL MATCH (this)-[this_posts0_relationship:HAS_POST]->(this_posts0:Post) WITH this_posts0_relationship, collect(DISTINCT this_posts0) AS this_posts0_to_delete CALL { WITH this_posts0_to_delete diff --git a/packages/graphql/tests/tck/directives/authorization/arguments/roles-where.test.ts b/packages/graphql/tests/tck/directives/authorization/arguments/roles-where.test.ts index f1debaaad4..ab13f78b41 100644 --- a/packages/graphql/tests/tck/directives/authorization/arguments/roles-where.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/arguments/roles-where.test.ts @@ -96,7 +96,7 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN this { .id } AS this" @@ -133,7 +133,7 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE (this.name = $param0 AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $param4 IN $jwt.roles)) OR ($isAuthenticated = true AND $param5 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN this { .id } AS this" @@ -174,13 +174,13 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { WITH this - MATCH (this)-[this0:\`HAS_POST\`]->(this1:\`Post\`) - WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(this2 IN [(this1)<-[:\`HAS_POST\`]-(this2:\`User\`) WHERE this2.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + MATCH (this)-[this0:HAS_POST]->(this1:Post) + WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(this2 IN [(this1)<-[:HAS_POST]-(this2:User) WHERE this2.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this1 { .content } AS this1 RETURN collect(this1) AS var3 } @@ -227,13 +227,13 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { WITH this - MATCH (this)-[this0:\`HAS_POST\`]->(this1:\`Post\`) - WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(this2 IN [(this1)<-[:\`HAS_POST\`]-(this2:\`User\`) WHERE this2.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + MATCH (this)-[this0:HAS_POST]->(this1:Post) + WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(this2 IN [(this1)<-[:HAS_POST]-(this2:User) WHERE this2.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH { node: { content: this1.content } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount @@ -282,13 +282,13 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { WITH this - MATCH (this)-[this0:\`HAS_POST\`]->(this1:\`Post\`) - WHERE (this1.id = $param5 AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(this2 IN [(this1)<-[:\`HAS_POST\`]-(this2:\`User\`) WHERE this2.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $param6 IN $jwt.roles)) OR ($isAuthenticated = true AND $param7 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + MATCH (this)-[this0:HAS_POST]->(this1:Post) + WHERE (this1.id = $param5 AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(this2 IN [(this1)<-[:HAS_POST]-(this2:User) WHERE this2.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $param6 IN $jwt.roles)) OR ($isAuthenticated = true AND $param7 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH { node: { content: this1.content } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount @@ -334,13 +334,13 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { WITH this - MATCH (this)-[this0:\`HAS_POST\`]->(this1:\`Post\`) - WHERE (this1.content = $param5 AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(this2 IN [(this1)<-[:\`HAS_POST\`]-(this2:\`User\`) WHERE this2.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $param6 IN $jwt.roles)) OR ($isAuthenticated = true AND $param7 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + MATCH (this)-[this0:HAS_POST]->(this1:Post) + WHERE (this1.content = $param5 AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(this2 IN [(this1)<-[:HAS_POST]-(this2:User) WHERE this2.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $param6 IN $jwt.roles)) OR ($isAuthenticated = true AND $param7 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH this1 { .content } AS this1 RETURN collect(this1) AS var3 } @@ -386,15 +386,15 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { WITH this CALL { WITH * - MATCH (this)-[this0:\`HAS_POST\`]->(this1:\`Post\`) - WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(this2 IN [(this1)<-[:\`HAS_POST\`]-(this2:\`User\`) WHERE this2.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + MATCH (this)-[this0:HAS_POST]->(this1:Post) + WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(this2 IN [(this1)<-[:HAS_POST]-(this2:User) WHERE this2.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this1 { __resolveType: \\"Post\\", __id: id(this), .id } AS this1 RETURN this1 AS var3 } @@ -446,15 +446,15 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { WITH this CALL { WITH this - MATCH (this)-[this0:\`HAS_POST\`]->(this1:\`Post\`) - WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(this2 IN [(this1)<-[:\`HAS_POST\`]-(this2:\`User\`) WHERE this2.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + MATCH (this)-[this0:HAS_POST]->(this1:Post) + WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(this2 IN [(this1)<-[:HAS_POST]-(this2:User) WHERE this2.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH { node: { __resolveType: \\"Post\\", __id: id(this1), id: this1.id } } AS edge RETURN edge } @@ -507,15 +507,15 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { WITH this CALL { WITH this - MATCH (this)-[this0:\`HAS_POST\`]->(this1:\`Post\`) - WHERE (this1.id = $param5 AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(this2 IN [(this1)<-[:\`HAS_POST\`]-(this2:\`User\`) WHERE this2.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $param6 IN $jwt.roles)) OR ($isAuthenticated = true AND $param7 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + MATCH (this)-[this0:HAS_POST]->(this1:Post) + WHERE (this1.id = $param5 AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(this2 IN [(this1)<-[:HAS_POST]-(this2:User) WHERE this2.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $param6 IN $jwt.roles)) OR ($isAuthenticated = true AND $param7 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH { node: { __resolveType: \\"Post\\", __id: id(this1), id: this1.id } } AS edge RETURN edge } @@ -562,7 +562,7 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) SET this.name = $this_update_name @@ -608,7 +608,7 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE (this.name = $param0 AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $param4 IN $jwt.roles)) OR ($isAuthenticated = true AND $param5 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) SET this.name = $this_update_name @@ -658,21 +658,21 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this CALL { WITH this - MATCH (this)-[this_has_post0_relationship:\`HAS_POST\`]->(this_posts0:Post) - WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_posts0)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + MATCH (this)-[this_has_post0_relationship:HAS_POST]->(this_posts0:Post) + WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_posts0)<-[:HAS_POST]-(authorization_this0:User) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) SET this_posts0.id = $this_update_posts0_id WITH this, this_posts0 - WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_posts0)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_posts0)<-[:HAS_POST]-(authorization_this0:User) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this, this_posts0 CALL { WITH this_posts0 - MATCH (this_posts0)<-[this_posts0_creator_User_unique:\`HAS_POST\`]-(:User) + MATCH (this_posts0)<-[this_posts0_creator_User_unique:HAS_POST]-(:User) WITH count(this_posts0_creator_User_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDPost.creator must be less than or equal to one', [0]) RETURN c AS this_posts0_creator_User_unique_ignored @@ -684,8 +684,8 @@ describe("Cypher Auth Where with Roles", () => { WITH * CALL { WITH this - MATCH (this)-[update_this0:\`HAS_POST\`]->(update_this1:\`Post\`) - WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(update_this2 IN [(update_this1)<-[:\`HAS_POST\`]-(update_this2:\`User\`) WHERE update_this2.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $update_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $update_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + MATCH (this)-[update_this0:HAS_POST]->(update_this1:Post) + WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(update_this2 IN [(update_this1)<-[:HAS_POST]-(update_this2:User) WHERE update_this2.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $update_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $update_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH update_this1 { .id } AS update_this1 RETURN collect(update_this1) AS update_var3 } @@ -729,7 +729,7 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) DETACH DELETE this" @@ -766,14 +766,14 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH * CALL { WITH * - OPTIONAL MATCH (this)-[this_posts0_relationship:\`HAS_POST\`]->(this_posts0:Post) - WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_posts0)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + OPTIONAL MATCH (this)-[this_posts0_relationship:HAS_POST]->(this_posts0:Post) + WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_posts0)<-[:HAS_POST]-(authorization_this0:User) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this_posts0_relationship, collect(DISTINCT this_posts0) AS this_posts0_to_delete CALL { WITH this_posts0_to_delete @@ -832,7 +832,7 @@ describe("Cypher Auth Where with Roles", () => { CALL { WITH this0 OPTIONAL MATCH (this0_posts_connect0_node:Post) - WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this0.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this0_posts_connect0_node)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this0.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this0_posts_connect0_node)<-[:HAS_POST]-(authorization_this0:User) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) CALL { WITH * WITH collect(this0_posts_connect0_node) as connectedNodes, collect(this0) as parentNodes @@ -840,19 +840,19 @@ describe("Cypher Auth Where with Roles", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_posts_connect0_node - MERGE (this0)-[:\`HAS_POST\`]->(this0_posts_connect0_node) + MERGE (this0)-[:HAS_POST]->(this0_posts_connect0_node) } } WITH this0, this0_posts_connect0_node WITH this0, this0_posts_connect0_node - WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this0.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this0_posts_connect0_node)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this0.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this0_posts_connect0_node)<-[:HAS_POST]-(authorization_this0:User) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN count(*) AS connect_this0_posts_connect_Post } WITH this0 WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this0.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN this0 } - RETURN [ this0 { .id } ] AS data" + RETURN [this0 { .id }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -912,7 +912,7 @@ describe("Cypher Auth Where with Roles", () => { CALL { WITH this0 OPTIONAL MATCH (this0_posts_connect0_node:Post) - WHERE this0_posts_connect0_node.id = $this0_posts_connect0_node_param0 AND (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this0.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this0_posts_connect0_node)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE this0_posts_connect0_node.id = $this0_posts_connect0_node_param0 AND (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this0.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this0_posts_connect0_node)<-[:HAS_POST]-(authorization_this0:User) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) CALL { WITH * WITH collect(this0_posts_connect0_node) as connectedNodes, collect(this0) as parentNodes @@ -920,19 +920,19 @@ describe("Cypher Auth Where with Roles", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_posts_connect0_node - MERGE (this0)-[:\`HAS_POST\`]->(this0_posts_connect0_node) + MERGE (this0)-[:HAS_POST]->(this0_posts_connect0_node) } } WITH this0, this0_posts_connect0_node WITH this0, this0_posts_connect0_node - WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this0.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this0_posts_connect0_node)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this0.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this0_posts_connect0_node)<-[:HAS_POST]-(authorization_this0:User) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN count(*) AS connect_this0_posts_connect_Post } WITH this0 WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this0.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN this0 } - RETURN [ this0 { .id } ] AS data" + RETURN [this0 { .id }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -975,14 +975,14 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this CALL { WITH this OPTIONAL MATCH (this_posts0_connect0_node:Post) - WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_posts0_connect0_node)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_posts0_connect0_node)<-[:HAS_POST]-(authorization_this0:User) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) CALL { WITH * WITH collect(this_posts0_connect0_node) as connectedNodes, collect(this) as parentNodes @@ -990,12 +990,12 @@ describe("Cypher Auth Where with Roles", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_posts0_connect0_node - MERGE (this)-[:\`HAS_POST\`]->(this_posts0_connect0_node) + MERGE (this)-[:HAS_POST]->(this_posts0_connect0_node) } } WITH this, this_posts0_connect0_node WITH this, this_posts0_connect0_node - WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_posts0_connect0_node)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_posts0_connect0_node)<-[:HAS_POST]-(authorization_this0:User) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN count(*) AS connect_this_posts0_connect_Post } WITH this @@ -1041,14 +1041,14 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this CALL { WITH this OPTIONAL MATCH (this_posts0_connect0_node:Post) - WHERE this_posts0_connect0_node.id = $this_posts0_connect0_node_param0 AND (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_posts0_connect0_node)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE this_posts0_connect0_node.id = $this_posts0_connect0_node_param0 AND (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_posts0_connect0_node)<-[:HAS_POST]-(authorization_this0:User) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) CALL { WITH * WITH collect(this_posts0_connect0_node) as connectedNodes, collect(this) as parentNodes @@ -1056,12 +1056,12 @@ describe("Cypher Auth Where with Roles", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_posts0_connect0_node - MERGE (this)-[:\`HAS_POST\`]->(this_posts0_connect0_node) + MERGE (this)-[:HAS_POST]->(this_posts0_connect0_node) } } WITH this, this_posts0_connect0_node WITH this, this_posts0_connect0_node - WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_posts0_connect0_node)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_posts0_connect0_node)<-[:HAS_POST]-(authorization_this0:User) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN count(*) AS connect_this_posts0_connect_Post } WITH this @@ -1108,14 +1108,14 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this CALL { WITH this OPTIONAL MATCH (this_connect_posts0_node:Post) - WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_connect_posts0_node)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_connect_posts0_node)<-[:HAS_POST]-(authorization_this0:User) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) CALL { WITH * WITH collect(this_connect_posts0_node) as connectedNodes, collect(this) as parentNodes @@ -1123,12 +1123,12 @@ describe("Cypher Auth Where with Roles", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_posts0_node - MERGE (this)-[:\`HAS_POST\`]->(this_connect_posts0_node) + MERGE (this)-[:HAS_POST]->(this_connect_posts0_node) } } WITH this, this_connect_posts0_node WITH this, this_connect_posts0_node - WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_connect_posts0_node)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_connect_posts0_node)<-[:HAS_POST]-(authorization_this0:User) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN count(*) AS connect_this_connect_posts_Post } WITH * @@ -1173,14 +1173,14 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this CALL { WITH this OPTIONAL MATCH (this_connect_posts0_node:Post) - WHERE this_connect_posts0_node.id = $this_connect_posts0_node_param0 AND (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_connect_posts0_node)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE this_connect_posts0_node.id = $this_connect_posts0_node_param0 AND (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_connect_posts0_node)<-[:HAS_POST]-(authorization_this0:User) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) CALL { WITH * WITH collect(this_connect_posts0_node) as connectedNodes, collect(this) as parentNodes @@ -1188,12 +1188,12 @@ describe("Cypher Auth Where with Roles", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_posts0_node - MERGE (this)-[:\`HAS_POST\`]->(this_connect_posts0_node) + MERGE (this)-[:HAS_POST]->(this_connect_posts0_node) } } WITH this, this_connect_posts0_node WITH this, this_connect_posts0_node - WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_connect_posts0_node)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_connect_posts0_node)<-[:HAS_POST]-(authorization_this0:User) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN count(*) AS connect_this_connect_posts_Post } WITH * @@ -1239,14 +1239,14 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_posts0_disconnect0_rel:\`HAS_POST\`]->(this_posts0_disconnect0:Post) - WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_posts0_disconnect0)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + OPTIONAL MATCH (this)-[this_posts0_disconnect0_rel:HAS_POST]->(this_posts0_disconnect0:Post) + WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_posts0_disconnect0)<-[:HAS_POST]-(authorization_this0:User) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) CALL { WITH this_posts0_disconnect0, this_posts0_disconnect0_rel, this WITH collect(this_posts0_disconnect0) as this_posts0_disconnect0, this_posts0_disconnect0_rel, this @@ -1254,7 +1254,7 @@ describe("Cypher Auth Where with Roles", () => { DELETE this_posts0_disconnect0_rel } WITH this, this_posts0_disconnect0 - WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_posts0_disconnect0)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_posts0_disconnect0)<-[:HAS_POST]-(authorization_this0:User) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN count(*) AS disconnect_this_posts0_disconnect_Post } WITH this @@ -1300,14 +1300,14 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_posts0_disconnect0_rel:\`HAS_POST\`]->(this_posts0_disconnect0:Post) - WHERE this_posts0_disconnect0.id = $updateUsers_args_update_posts0_disconnect0_where_Post_this_posts0_disconnect0param0 AND (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_posts0_disconnect0)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + OPTIONAL MATCH (this)-[this_posts0_disconnect0_rel:HAS_POST]->(this_posts0_disconnect0:Post) + WHERE this_posts0_disconnect0.id = $updateUsers_args_update_posts0_disconnect0_where_Post_this_posts0_disconnect0param0 AND (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_posts0_disconnect0)<-[:HAS_POST]-(authorization_this0:User) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) CALL { WITH this_posts0_disconnect0, this_posts0_disconnect0_rel, this WITH collect(this_posts0_disconnect0) as this_posts0_disconnect0, this_posts0_disconnect0_rel, this @@ -1315,7 +1315,7 @@ describe("Cypher Auth Where with Roles", () => { DELETE this_posts0_disconnect0_rel } WITH this, this_posts0_disconnect0 - WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_posts0_disconnect0)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_posts0_disconnect0)<-[:HAS_POST]-(authorization_this0:User) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN count(*) AS disconnect_this_posts0_disconnect_Post } WITH this @@ -1381,14 +1381,14 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_disconnect_posts0_rel:\`HAS_POST\`]->(this_disconnect_posts0:Post) - WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_disconnect_posts0)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + OPTIONAL MATCH (this)-[this_disconnect_posts0_rel:HAS_POST]->(this_disconnect_posts0:Post) + WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_disconnect_posts0)<-[:HAS_POST]-(authorization_this0:User) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) CALL { WITH this_disconnect_posts0, this_disconnect_posts0_rel, this WITH collect(this_disconnect_posts0) as this_disconnect_posts0, this_disconnect_posts0_rel, this @@ -1396,7 +1396,7 @@ describe("Cypher Auth Where with Roles", () => { DELETE this_disconnect_posts0_rel } WITH this, this_disconnect_posts0 - WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_disconnect_posts0)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_disconnect_posts0)<-[:HAS_POST]-(authorization_this0:User) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN count(*) AS disconnect_this_disconnect_posts_Post } WITH * @@ -1452,14 +1452,14 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_disconnect_posts0_rel:\`HAS_POST\`]->(this_disconnect_posts0:Post) - WHERE this_disconnect_posts0.id = $updateUsers_args_disconnect_posts0_where_Post_this_disconnect_posts0param0 AND (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_disconnect_posts0)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + OPTIONAL MATCH (this)-[this_disconnect_posts0_rel:HAS_POST]->(this_disconnect_posts0:Post) + WHERE this_disconnect_posts0.id = $updateUsers_args_disconnect_posts0_where_Post_this_disconnect_posts0param0 AND (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_disconnect_posts0)<-[:HAS_POST]-(authorization_this0:User) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) CALL { WITH this_disconnect_posts0, this_disconnect_posts0_rel, this WITH collect(this_disconnect_posts0) as this_disconnect_posts0, this_disconnect_posts0_rel, this @@ -1467,7 +1467,7 @@ describe("Cypher Auth Where with Roles", () => { DELETE this_disconnect_posts0_rel } WITH this, this_disconnect_posts0 - WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_disconnect_posts0)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (this.id = coalesce($jwt.sub, $jwtDefault) AND $authorization_param3 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND (single(authorization_this0 IN [(this_disconnect_posts0)<-[:HAS_POST]-(authorization_this0:User) WHERE authorization_this0.id = coalesce($jwt.sub, $jwtDefault) | 1] WHERE true) AND $authorization_param5 IN $jwt.roles)) OR ($isAuthenticated = true AND $authorization_param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN count(*) AS disconnect_this_disconnect_posts_Post } WITH * diff --git a/packages/graphql/tests/tck/directives/authorization/arguments/roles/roles.test.ts b/packages/graphql/tests/tck/directives/authorization/arguments/roles/roles.test.ts index 2d39b683e8..aca9b4cad5 100644 --- a/packages/graphql/tests/tck/directives/authorization/arguments/roles/roles.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/arguments/roles/roles.test.ts @@ -113,7 +113,7 @@ describe("Cypher Auth Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $param1 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN this { .id, .name } AS this" @@ -150,7 +150,7 @@ describe("Cypher Auth Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $param1 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH * @@ -190,7 +190,7 @@ describe("Cypher Auth Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $param1 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH * @@ -243,7 +243,7 @@ describe("Cypher Auth Roles", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`User\`) + CREATE (create_this1:User) SET create_this1.id = create_var0.id WITH * @@ -293,7 +293,7 @@ describe("Cypher Auth Roles", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`User\`) + CREATE (create_this1:User) SET create_this1.id = create_var0.id, create_this1.password = create_var0.password @@ -345,7 +345,7 @@ describe("Cypher Auth Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE (this.id = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $param2 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0])) SET this.id = $this_update_id @@ -389,7 +389,7 @@ describe("Cypher Auth Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE (this.id = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $param2 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH this @@ -435,7 +435,7 @@ describe("Cypher Auth Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $param1 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this @@ -450,7 +450,7 @@ describe("Cypher Auth Roles", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_posts0_node - MERGE (this)-[:\`HAS_POST\`]->(this_connect_posts0_node) + MERGE (this)-[:HAS_POST]->(this_connect_posts0_node) } } WITH this, this_connect_posts0_node @@ -500,11 +500,11 @@ describe("Cypher Auth Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Comment\`) + "MATCH (this:Comment) WITH this CALL { WITH this - MATCH (this)<-[this_has_comment0_relationship:\`HAS_COMMENT\`]-(this_post0:Post) + MATCH (this)<-[this_has_comment0_relationship:HAS_COMMENT]-(this_post0:Post) WITH this, this_post0 CALL { WITH this, this_post0 @@ -517,7 +517,7 @@ describe("Cypher Auth Roles", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this_post0 UNWIND connectedNodes as this_post0_creator0_connect0_node - MERGE (this_post0)-[:\`HAS_POST\`]->(this_post0_creator0_connect0_node) + MERGE (this_post0)-[:HAS_POST]->(this_post0_creator0_connect0_node) } } WITH this, this_post0, this_post0_creator0_connect0_node @@ -528,7 +528,7 @@ describe("Cypher Auth Roles", () => { WITH this, this_post0 CALL { WITH this_post0 - MATCH (this_post0)-[this_post0_creator_User_unique:\`HAS_POST\`]->(:User) + MATCH (this_post0)-[this_post0_creator_User_unique:HAS_POST]->(:User) WITH count(this_post0_creator_User_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDPost.creator required exactly once', [0]) RETURN c AS this_post0_creator_User_unique_ignored @@ -538,7 +538,7 @@ describe("Cypher Auth Roles", () => { WITH * CALL { WITH this - MATCH (this)<-[this_post_Post_unique:\`HAS_COMMENT\`]-(:Post) + MATCH (this)<-[this_post_Post_unique:HAS_COMMENT]-(:Post) WITH count(this_post_Post_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDComment.post required exactly once', [0]) RETURN c AS this_post_Post_unique_ignored @@ -580,13 +580,13 @@ describe("Cypher Auth Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $param1 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_disconnect_posts0_rel:\`HAS_POST\`]->(this_disconnect_posts0:Post) + OPTIONAL MATCH (this)-[this_disconnect_posts0_rel:HAS_POST]->(this_disconnect_posts0:Post) WHERE (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $authorization_param1 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $authorization_param3 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0])) CALL { WITH this_disconnect_posts0, this_disconnect_posts0_rel, this @@ -649,15 +649,15 @@ describe("Cypher Auth Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Comment\`) + "MATCH (this:Comment) WITH this CALL { WITH this - MATCH (this)<-[this_has_comment0_relationship:\`HAS_COMMENT\`]-(this_post0:Post) + MATCH (this)<-[this_has_comment0_relationship:HAS_COMMENT]-(this_post0:Post) WITH this, this_post0 CALL { WITH this, this_post0 - OPTIONAL MATCH (this_post0)-[this_post0_creator0_disconnect0_rel:\`HAS_POST\`]->(this_post0_creator0_disconnect0:User) + OPTIONAL MATCH (this_post0)-[this_post0_creator0_disconnect0_rel:HAS_POST]->(this_post0_creator0_disconnect0:User) WHERE this_post0_creator0_disconnect0.id = $updateComments_args_update_post_update_node_creator_disconnect_where_User_this_post0_creator0_disconnect0param0 AND (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $authorization_param1 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $authorization_param3 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0])) CALL { WITH this_post0_creator0_disconnect0, this_post0_creator0_disconnect0_rel, this_post0 @@ -672,7 +672,7 @@ describe("Cypher Auth Roles", () => { WITH this, this_post0 CALL { WITH this_post0 - MATCH (this_post0)-[this_post0_creator_User_unique:\`HAS_POST\`]->(:User) + MATCH (this_post0)-[this_post0_creator_User_unique:HAS_POST]->(:User) WITH count(this_post0_creator_User_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDPost.creator required exactly once', [0]) RETURN c AS this_post0_creator_User_unique_ignored @@ -682,7 +682,7 @@ describe("Cypher Auth Roles", () => { WITH * CALL { WITH this - MATCH (this)<-[this_post_Post_unique:\`HAS_COMMENT\`]-(:Post) + MATCH (this)<-[this_post_Post_unique:HAS_COMMENT]-(:Post) WITH count(this_post_Post_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDComment.post required exactly once', [0]) RETURN c AS this_post_Post_unique_ignored @@ -743,7 +743,7 @@ describe("Cypher Auth Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $param1 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0]) DETACH DELETE this" @@ -778,13 +778,13 @@ describe("Cypher Auth Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $param1 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH * CALL { WITH * - OPTIONAL MATCH (this)-[this_posts0_relationship:\`HAS_POST\`]->(this_posts0:Post) + OPTIONAL MATCH (this)-[this_posts0_relationship:HAS_POST]->(this_posts0:Post) WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $authorization_param1 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this_posts0_relationship, collect(DISTINCT this_posts0) AS this_posts0_to_delete CALL { diff --git a/packages/graphql/tests/tck/directives/authorization/arguments/where/interface-relationships/implementation-where.test.ts b/packages/graphql/tests/tck/directives/authorization/arguments/where/interface-relationships/implementation-where.test.ts index 005f9d3fc9..9724c3dcd1 100644 --- a/packages/graphql/tests/tck/directives/authorization/arguments/where/interface-relationships/implementation-where.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/arguments/where/interface-relationships/implementation-where.test.ts @@ -105,8 +105,8 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) - OPTIONAL MATCH (this)<-[:\`HAS_CONTENT\`]-(this0:\`User\`) + "MATCH (this:Post) + OPTIONAL MATCH (this)<-[:HAS_CONTENT]-(this0:User) WITH *, count(this0) AS creatorCount WITH * WHERE ($isAuthenticated = true AND (creatorCount <> 0 AND this0.id = coalesce($jwt.sub, $jwtDefault))) @@ -140,8 +140,8 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) - OPTIONAL MATCH (this)<-[:\`HAS_CONTENT\`]-(this0:\`User\`) + "MATCH (this:Post) + OPTIONAL MATCH (this)<-[:HAS_CONTENT]-(this0:User) WITH *, count(this0) AS creatorCount WITH * WHERE (this.content = $param0 AND ($isAuthenticated = true AND (creatorCount <> 0 AND this0.id = coalesce($jwt.sub, $jwtDefault)))) @@ -181,20 +181,20 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) CALL { WITH this CALL { WITH * - MATCH (this)-[this0:\`HAS_CONTENT\`]->(this1:\`Comment\`) + MATCH (this)-[this0:HAS_CONTENT]->(this1:Comment) WITH this1 { __resolveType: \\"Comment\\", __id: id(this) } AS this1 RETURN this1 AS var2 UNION WITH * - MATCH (this)-[this3:\`HAS_CONTENT\`]->(this4:\`Post\`) - OPTIONAL MATCH (this4)<-[:\`HAS_CONTENT\`]-(this5:\`User\`) + MATCH (this)-[this3:HAS_CONTENT]->(this4:Post) + OPTIONAL MATCH (this4)<-[:HAS_CONTENT]-(this5:User) WITH *, count(this5) AS creatorCount WITH * WHERE ($isAuthenticated = true AND (creatorCount <> 0 AND this5.id = coalesce($jwt.sub, $jwtDefault))) @@ -243,20 +243,20 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) CALL { WITH this CALL { WITH this - MATCH (this)-[this0:\`HAS_CONTENT\`]->(this1:\`Comment\`) + MATCH (this)-[this0:HAS_CONTENT]->(this1:Comment) WITH { node: { __resolveType: \\"Comment\\", __id: id(this1) } } AS edge RETURN edge UNION WITH this - MATCH (this)-[this2:\`HAS_CONTENT\`]->(this3:\`Post\`) - OPTIONAL MATCH (this3)<-[:\`HAS_CONTENT\`]-(this4:\`User\`) + MATCH (this)-[this2:HAS_CONTENT]->(this3:Post) + OPTIONAL MATCH (this3)<-[:HAS_CONTENT]-(this4:User) WITH *, count(this4) AS creatorCount WITH * WHERE ($isAuthenticated = true AND (creatorCount <> 0 AND this4.id = coalesce($jwt.sub, $jwtDefault))) @@ -306,21 +306,21 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) CALL { WITH this CALL { WITH this - MATCH (this)-[this0:\`HAS_CONTENT\`]->(this1:\`Comment\`) + MATCH (this)-[this0:HAS_CONTENT]->(this1:Comment) WHERE this1.id = $param3 WITH { node: { __resolveType: \\"Comment\\", __id: id(this1) } } AS edge RETURN edge UNION WITH this - MATCH (this)-[this2:\`HAS_CONTENT\`]->(this3:\`Post\`) - OPTIONAL MATCH (this3)<-[:\`HAS_CONTENT\`]-(this4:\`User\`) + MATCH (this)-[this2:HAS_CONTENT]->(this3:Post) + OPTIONAL MATCH (this3)<-[:HAS_CONTENT]-(this4:User) WITH *, count(this4) AS creatorCount WITH * WHERE (this3.id = $param4 AND ($isAuthenticated = true AND (creatorCount <> 0 AND this4.id = coalesce($jwt.sub, $jwtDefault)))) @@ -365,8 +365,8 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) - OPTIONAL MATCH (this)<-[:\`HAS_CONTENT\`]-(this0:\`User\`) + "MATCH (this:Post) + OPTIONAL MATCH (this)<-[:HAS_CONTENT]-(this0:User) WITH *, count(this0) AS creatorCount WITH * WHERE ($isAuthenticated = true AND (creatorCount <> 0 AND this0.id = coalesce($jwt.sub, $jwtDefault))) @@ -374,7 +374,7 @@ describe("Cypher Auth Where", () => { WITH * CALL { WITH this - MATCH (this)<-[this_creator_User_unique:\`HAS_CONTENT\`]-(:User) + MATCH (this)<-[this_creator_User_unique:HAS_CONTENT]-(:User) WITH count(this_creator_User_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDPost.creator required exactly once', [0]) RETURN c AS this_creator_User_unique_ignored @@ -413,8 +413,8 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) - OPTIONAL MATCH (this)<-[:\`HAS_CONTENT\`]-(this0:\`User\`) + "MATCH (this:Post) + OPTIONAL MATCH (this)<-[:HAS_CONTENT]-(this0:User) WITH *, count(this0) AS creatorCount WITH * WHERE (this.content = $param0 AND ($isAuthenticated = true AND (creatorCount <> 0 AND this0.id = coalesce($jwt.sub, $jwtDefault)))) @@ -422,7 +422,7 @@ describe("Cypher Auth Where", () => { WITH * CALL { WITH this - MATCH (this)<-[this_creator_User_unique:\`HAS_CONTENT\`]-(:User) + MATCH (this)<-[this_creator_User_unique:HAS_CONTENT]-(:User) WITH count(this_creator_User_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDPost.creator required exactly once', [0]) RETURN c AS this_creator_User_unique_ignored @@ -462,7 +462,7 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) WITH this @@ -471,12 +471,12 @@ describe("Cypher Auth Where", () => { WITH this CALL { WITH this - MATCH (this)-[this_has_content0_relationship:\`HAS_CONTENT\`]->(this_content0:Comment) + MATCH (this)-[this_has_content0_relationship:HAS_CONTENT]->(this_content0:Comment) SET this_content0.id = $this_update_content0_id WITH this, this_content0 CALL { WITH this_content0 - MATCH (this_content0)<-[this_content0_creator_User_unique:\`HAS_CONTENT\`]-(:User) + MATCH (this_content0)<-[this_content0_creator_User_unique:HAS_CONTENT]-(:User) WITH count(this_content0_creator_User_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDComment.creator required exactly once', [0]) RETURN c AS this_content0_creator_User_unique_ignored @@ -490,15 +490,15 @@ describe("Cypher Auth Where", () => { WITH this CALL { WITH this - MATCH (this)-[this_has_content0_relationship:\`HAS_CONTENT\`]->(this_content0:Post) - OPTIONAL MATCH (this_content0)<-[:\`HAS_CONTENT\`]-(authorization_this0:\`User\`) + MATCH (this)-[this_has_content0_relationship:HAS_CONTENT]->(this_content0:Post) + OPTIONAL MATCH (this_content0)<-[:HAS_CONTENT]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WHERE ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault))) SET this_content0.id = $this_update_content0_id WITH this, this_content0 CALL { WITH this_content0 - MATCH (this_content0)<-[this_content0_creator_User_unique:\`HAS_CONTENT\`]-(:User) + MATCH (this_content0)<-[this_content0_creator_User_unique:HAS_CONTENT]-(:User) WITH count(this_content0_creator_User_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDPost.creator required exactly once', [0]) RETURN c AS this_content0_creator_User_unique_ignored @@ -539,8 +539,8 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) - OPTIONAL MATCH (this)<-[:\`HAS_CONTENT\`]-(this0:\`User\`) + "MATCH (this:Post) + OPTIONAL MATCH (this)<-[:HAS_CONTENT]-(this0:User) WITH *, count(this0) AS creatorCount WITH * WHERE ($isAuthenticated = true AND (creatorCount <> 0 AND this0.id = coalesce($jwt.sub, $jwtDefault))) @@ -574,8 +574,8 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Post\`) - OPTIONAL MATCH (this)<-[:\`HAS_CONTENT\`]-(this0:\`User\`) + "MATCH (this:Post) + OPTIONAL MATCH (this)<-[:HAS_CONTENT]-(this0:User) WITH *, count(this0) AS creatorCount WITH * WHERE (this.content = $param0 AND ($isAuthenticated = true AND (creatorCount <> 0 AND this0.id = coalesce($jwt.sub, $jwtDefault)))) @@ -610,13 +610,13 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) WITH * CALL { WITH * - OPTIONAL MATCH (this)-[this_content_Comment0_relationship:\`HAS_CONTENT\`]->(this_content_Comment0:Comment) + OPTIONAL MATCH (this)-[this_content_Comment0_relationship:HAS_CONTENT]->(this_content_Comment0:Comment) WITH this_content_Comment0_relationship, collect(DISTINCT this_content_Comment0) AS this_content_Comment0_to_delete CALL { WITH this_content_Comment0_to_delete @@ -624,12 +624,12 @@ describe("Cypher Auth Where", () => { DETACH DELETE x } } - OPTIONAL MATCH (this_content_Post0)<-[:\`HAS_CONTENT\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this_content_Post0)<-[:HAS_CONTENT]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WITH * CALL { WITH * - OPTIONAL MATCH (this)-[this_content_Post0_relationship:\`HAS_CONTENT\`]->(this_content_Post0:Post) + OPTIONAL MATCH (this)-[this_content_Post0_relationship:HAS_CONTENT]->(this_content_Post0:Post) WHERE ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault))) WITH this_content_Post0_relationship, collect(DISTINCT this_content_Post0) AS this_content_Post0_to_delete CALL { @@ -691,7 +691,7 @@ describe("Cypher Auth Where", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_content_connect0_node - MERGE (this0)-[:\`HAS_CONTENT\`]->(this0_content_connect0_node) + MERGE (this0)-[:HAS_CONTENT]->(this0_content_connect0_node) } } WITH this0, this0_content_connect0_node @@ -700,7 +700,7 @@ describe("Cypher Auth Where", () => { CALL { WITH this0 OPTIONAL MATCH (this0_content_connect1_node:Post) - OPTIONAL MATCH (this0_content_connect1_node)<-[:\`HAS_CONTENT\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this0_content_connect1_node)<-[:HAS_CONTENT]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WHERE (($isAuthenticated = true AND this0.id = coalesce($jwt.sub, $jwtDefault)) AND ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault)))) CALL { @@ -710,7 +710,7 @@ describe("Cypher Auth Where", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_content_connect1_node - MERGE (this0)-[:\`HAS_CONTENT\`]->(this0_content_connect1_node) + MERGE (this0)-[:HAS_CONTENT]->(this0_content_connect1_node) } } WITH this0, this0_content_connect1_node @@ -718,7 +718,7 @@ describe("Cypher Auth Where", () => { } RETURN this0 } - RETURN [ this0 { .id } ] AS data" + RETURN [this0 { .id }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -780,7 +780,7 @@ describe("Cypher Auth Where", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_content_connect0_node - MERGE (this0)-[:\`HAS_CONTENT\`]->(this0_content_connect0_node) + MERGE (this0)-[:HAS_CONTENT]->(this0_content_connect0_node) } } WITH this0, this0_content_connect0_node @@ -789,7 +789,7 @@ describe("Cypher Auth Where", () => { CALL { WITH this0 OPTIONAL MATCH (this0_content_connect1_node:Post) - OPTIONAL MATCH (this0_content_connect1_node)<-[:\`HAS_CONTENT\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this0_content_connect1_node)<-[:HAS_CONTENT]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WHERE this0_content_connect1_node.id = $this0_content_connect1_node_param0 AND (($isAuthenticated = true AND this0.id = coalesce($jwt.sub, $jwtDefault)) AND ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault)))) CALL { @@ -799,7 +799,7 @@ describe("Cypher Auth Where", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_content_connect1_node - MERGE (this0)-[:\`HAS_CONTENT\`]->(this0_content_connect1_node) + MERGE (this0)-[:HAS_CONTENT]->(this0_content_connect1_node) } } WITH this0, this0_content_connect1_node @@ -807,7 +807,7 @@ describe("Cypher Auth Where", () => { } RETURN this0 } - RETURN [ this0 { .id } ] AS data" + RETURN [this0 { .id }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -845,7 +845,7 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) WITH this @@ -863,7 +863,7 @@ describe("Cypher Auth Where", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_content0_connect0_node - MERGE (this)-[:\`HAS_CONTENT\`]->(this_content0_connect0_node) + MERGE (this)-[:HAS_CONTENT]->(this_content0_connect0_node) } } WITH this, this_content0_connect0_node @@ -877,7 +877,7 @@ describe("Cypher Auth Where", () => { CALL { WITH this OPTIONAL MATCH (this_content0_connect0_node:Post) - OPTIONAL MATCH (this_content0_connect0_node)<-[:\`HAS_CONTENT\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this_content0_connect0_node)<-[:HAS_CONTENT]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WHERE (($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) AND ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault)))) CALL { @@ -887,7 +887,7 @@ describe("Cypher Auth Where", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_content0_connect0_node - MERGE (this)-[:\`HAS_CONTENT\`]->(this_content0_connect0_node) + MERGE (this)-[:HAS_CONTENT]->(this_content0_connect0_node) } } WITH this, this_content0_connect0_node @@ -928,7 +928,7 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) WITH this @@ -946,7 +946,7 @@ describe("Cypher Auth Where", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_content0_connect0_node - MERGE (this)-[:\`HAS_CONTENT\`]->(this_content0_connect0_node) + MERGE (this)-[:HAS_CONTENT]->(this_content0_connect0_node) } } WITH this, this_content0_connect0_node @@ -960,7 +960,7 @@ describe("Cypher Auth Where", () => { CALL { WITH this OPTIONAL MATCH (this_content0_connect0_node:Post) - OPTIONAL MATCH (this_content0_connect0_node)<-[:\`HAS_CONTENT\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this_content0_connect0_node)<-[:HAS_CONTENT]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WHERE this_content0_connect0_node.id = $this_content0_connect0_node_param0 AND (($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) AND ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault)))) CALL { @@ -970,7 +970,7 @@ describe("Cypher Auth Where", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_content0_connect0_node - MERGE (this)-[:\`HAS_CONTENT\`]->(this_content0_connect0_node) + MERGE (this)-[:HAS_CONTENT]->(this_content0_connect0_node) } } WITH this, this_content0_connect0_node @@ -1012,7 +1012,7 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) WITH this @@ -1027,7 +1027,7 @@ describe("Cypher Auth Where", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_content0_node - MERGE (this)-[:\`HAS_CONTENT\`]->(this_connect_content0_node) + MERGE (this)-[:HAS_CONTENT]->(this_connect_content0_node) } } WITH this, this_connect_content0_node @@ -1036,7 +1036,7 @@ describe("Cypher Auth Where", () => { CALL { WITH this OPTIONAL MATCH (this_connect_content1_node:Post) - OPTIONAL MATCH (this_connect_content1_node)<-[:\`HAS_CONTENT\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this_connect_content1_node)<-[:HAS_CONTENT]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WHERE (($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) AND ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault)))) CALL { @@ -1046,7 +1046,7 @@ describe("Cypher Auth Where", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_content1_node - MERGE (this)-[:\`HAS_CONTENT\`]->(this_connect_content1_node) + MERGE (this)-[:HAS_CONTENT]->(this_connect_content1_node) } } WITH this, this_connect_content1_node @@ -1086,7 +1086,7 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) WITH this @@ -1101,7 +1101,7 @@ describe("Cypher Auth Where", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_content0_node - MERGE (this)-[:\`HAS_CONTENT\`]->(this_connect_content0_node) + MERGE (this)-[:HAS_CONTENT]->(this_connect_content0_node) } } WITH this, this_connect_content0_node @@ -1110,7 +1110,7 @@ describe("Cypher Auth Where", () => { CALL { WITH this OPTIONAL MATCH (this_connect_content1_node:Post) - OPTIONAL MATCH (this_connect_content1_node)<-[:\`HAS_CONTENT\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this_connect_content1_node)<-[:HAS_CONTENT]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WHERE this_connect_content1_node.id = $this_connect_content1_node_param0 AND (($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) AND ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault)))) CALL { @@ -1120,7 +1120,7 @@ describe("Cypher Auth Where", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_content1_node - MERGE (this)-[:\`HAS_CONTENT\`]->(this_connect_content1_node) + MERGE (this)-[:HAS_CONTENT]->(this_connect_content1_node) } } WITH this, this_connect_content1_node @@ -1162,7 +1162,7 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) WITH this @@ -1171,7 +1171,7 @@ describe("Cypher Auth Where", () => { WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_content0_disconnect0_rel:\`HAS_CONTENT\`]->(this_content0_disconnect0:Comment) + OPTIONAL MATCH (this)-[this_content0_disconnect0_rel:HAS_CONTENT]->(this_content0_disconnect0:Comment) WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) CALL { WITH this_content0_disconnect0, this_content0_disconnect0_rel, this @@ -1188,8 +1188,8 @@ describe("Cypher Auth Where", () => { WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_content0_disconnect0_rel:\`HAS_CONTENT\`]->(this_content0_disconnect0:Post) - OPTIONAL MATCH (this_content0_disconnect0)<-[:\`HAS_CONTENT\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this)-[this_content0_disconnect0_rel:HAS_CONTENT]->(this_content0_disconnect0:Post) + OPTIONAL MATCH (this_content0_disconnect0)<-[:HAS_CONTENT]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WHERE (($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) AND ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault)))) CALL { @@ -1235,7 +1235,7 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) WITH this @@ -1244,7 +1244,7 @@ describe("Cypher Auth Where", () => { WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_content0_disconnect0_rel:\`HAS_CONTENT\`]->(this_content0_disconnect0:Comment) + OPTIONAL MATCH (this)-[this_content0_disconnect0_rel:HAS_CONTENT]->(this_content0_disconnect0:Comment) WHERE this_content0_disconnect0.id = $updateUsers_args_update_content0_disconnect0_where_Comment_this_content0_disconnect0param0 AND ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) CALL { WITH this_content0_disconnect0, this_content0_disconnect0_rel, this @@ -1261,8 +1261,8 @@ describe("Cypher Auth Where", () => { WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_content0_disconnect0_rel:\`HAS_CONTENT\`]->(this_content0_disconnect0:Post) - OPTIONAL MATCH (this_content0_disconnect0)<-[:\`HAS_CONTENT\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this)-[this_content0_disconnect0_rel:HAS_CONTENT]->(this_content0_disconnect0:Post) + OPTIONAL MATCH (this_content0_disconnect0)<-[:HAS_CONTENT]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WHERE this_content0_disconnect0.id = $updateUsers_args_update_content0_disconnect0_where_Post_this_content0_disconnect0param0 AND (($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) AND ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault)))) CALL { @@ -1329,13 +1329,13 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_disconnect_content0_rel:\`HAS_CONTENT\`]->(this_disconnect_content0:Comment) + OPTIONAL MATCH (this)-[this_disconnect_content0_rel:HAS_CONTENT]->(this_disconnect_content0:Comment) WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) CALL { WITH this_disconnect_content0, this_disconnect_content0_rel, this @@ -1347,8 +1347,8 @@ describe("Cypher Auth Where", () => { } CALL { WITH this - OPTIONAL MATCH (this)-[this_disconnect_content0_rel:\`HAS_CONTENT\`]->(this_disconnect_content0:Post) - OPTIONAL MATCH (this_disconnect_content0)<-[:\`HAS_CONTENT\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this)-[this_disconnect_content0_rel:HAS_CONTENT]->(this_disconnect_content0:Post) + OPTIONAL MATCH (this_disconnect_content0)<-[:HAS_CONTENT]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WHERE (($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) AND ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault)))) CALL { @@ -1404,13 +1404,13 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_disconnect_content0_rel:\`HAS_CONTENT\`]->(this_disconnect_content0:Comment) + OPTIONAL MATCH (this)-[this_disconnect_content0_rel:HAS_CONTENT]->(this_disconnect_content0:Comment) WHERE this_disconnect_content0.id = $updateUsers_args_disconnect_content0_where_Comment_this_disconnect_content0param0 AND ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) CALL { WITH this_disconnect_content0, this_disconnect_content0_rel, this @@ -1422,8 +1422,8 @@ describe("Cypher Auth Where", () => { } CALL { WITH this - OPTIONAL MATCH (this)-[this_disconnect_content0_rel:\`HAS_CONTENT\`]->(this_disconnect_content0:Post) - OPTIONAL MATCH (this_disconnect_content0)<-[:\`HAS_CONTENT\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this)-[this_disconnect_content0_rel:HAS_CONTENT]->(this_disconnect_content0:Post) + OPTIONAL MATCH (this_disconnect_content0)<-[:HAS_CONTENT]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WHERE this_disconnect_content0.id = $updateUsers_args_disconnect_content0_where_Post_this_disconnect_content0param0 AND (($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) AND ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault)))) CALL { diff --git a/packages/graphql/tests/tck/directives/authorization/arguments/where/where.test.ts b/packages/graphql/tests/tck/directives/authorization/arguments/where/where.test.ts index 70036335c3..503ae92b1b 100644 --- a/packages/graphql/tests/tck/directives/authorization/arguments/where/where.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/arguments/where/where.test.ts @@ -88,7 +88,7 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) RETURN this { .id } AS this" @@ -123,7 +123,7 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE (this.name = $param0 AND ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault))) RETURN this { .id } AS this" @@ -162,13 +162,13 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) CALL { WITH this - MATCH (this)-[this0:\`HAS_POST\`]->(this1:\`Post\`) - OPTIONAL MATCH (this1)<-[:\`HAS_POST\`]-(this2:\`User\`) + MATCH (this)-[this0:HAS_POST]->(this1:Post) + OPTIONAL MATCH (this1)<-[:HAS_POST]-(this2:User) WITH *, count(this2) AS creatorCount WITH * WHERE ($isAuthenticated = true AND (creatorCount <> 0 AND this2.id = coalesce($jwt.sub, $jwtDefault))) @@ -214,13 +214,13 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) CALL { WITH this - MATCH (this)-[this0:\`HAS_POST\`]->(this1:\`Post\`) - OPTIONAL MATCH (this1)<-[:\`HAS_POST\`]-(this2:\`User\`) + MATCH (this)-[this0:HAS_POST]->(this1:Post) + OPTIONAL MATCH (this1)<-[:HAS_POST]-(this2:User) WITH *, count(this2) AS creatorCount WITH * WHERE ($isAuthenticated = true AND (creatorCount <> 0 AND this2.id = coalesce($jwt.sub, $jwtDefault))) @@ -268,13 +268,13 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) CALL { WITH this - MATCH (this)-[this0:\`HAS_POST\`]->(this1:\`Post\`) - OPTIONAL MATCH (this1)<-[:\`HAS_POST\`]-(this2:\`User\`) + MATCH (this)-[this0:HAS_POST]->(this1:Post) + OPTIONAL MATCH (this1)<-[:HAS_POST]-(this2:User) WITH *, count(this2) AS creatorCount WITH * WHERE (this1.id = $param3 AND ($isAuthenticated = true AND (creatorCount <> 0 AND this2.id = coalesce($jwt.sub, $jwtDefault)))) @@ -319,13 +319,13 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) CALL { WITH this - MATCH (this)-[this0:\`HAS_POST\`]->(this1:\`Post\`) - OPTIONAL MATCH (this1)<-[:\`HAS_POST\`]-(this2:\`User\`) + MATCH (this)-[this0:HAS_POST]->(this1:Post) + OPTIONAL MATCH (this1)<-[:HAS_POST]-(this2:User) WITH *, count(this2) AS creatorCount WITH * WHERE (this1.content = $param3 AND ($isAuthenticated = true AND (creatorCount <> 0 AND this2.id = coalesce($jwt.sub, $jwtDefault)))) @@ -370,15 +370,15 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) CALL { WITH this CALL { WITH * - MATCH (this)-[this0:\`HAS_POST\`]->(this1:\`Post\`) - OPTIONAL MATCH (this1)<-[:\`HAS_POST\`]-(this2:\`User\`) + MATCH (this)-[this0:HAS_POST]->(this1:Post) + OPTIONAL MATCH (this1)<-[:HAS_POST]-(this2:User) WITH *, count(this2) AS creatorCount WITH * WHERE ($isAuthenticated = true AND (creatorCount <> 0 AND this2.id = coalesce($jwt.sub, $jwtDefault))) @@ -429,15 +429,15 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) CALL { WITH this CALL { WITH this - MATCH (this)-[this0:\`HAS_POST\`]->(this1:\`Post\`) - OPTIONAL MATCH (this1)<-[:\`HAS_POST\`]-(this2:\`User\`) + MATCH (this)-[this0:HAS_POST]->(this1:Post) + OPTIONAL MATCH (this1)<-[:HAS_POST]-(this2:User) WITH *, count(this2) AS creatorCount WITH * WHERE ($isAuthenticated = true AND (creatorCount <> 0 AND this2.id = coalesce($jwt.sub, $jwtDefault))) @@ -489,15 +489,15 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) CALL { WITH this CALL { WITH this - MATCH (this)-[this0:\`HAS_POST\`]->(this1:\`Post\`) - OPTIONAL MATCH (this1)<-[:\`HAS_POST\`]-(this2:\`User\`) + MATCH (this)-[this0:HAS_POST]->(this1:Post) + OPTIONAL MATCH (this1)<-[:HAS_POST]-(this2:User) WITH *, count(this2) AS creatorCount WITH * WHERE (this1.id = $param3 AND ($isAuthenticated = true AND (creatorCount <> 0 AND this2.id = coalesce($jwt.sub, $jwtDefault)))) @@ -543,7 +543,7 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) SET this.name = $this_update_name @@ -583,7 +583,7 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE (this.name = $param0 AND ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault))) SET this.name = $this_update_name @@ -627,21 +627,21 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) WITH this CALL { WITH this - MATCH (this)-[this_has_post0_relationship:\`HAS_POST\`]->(this_posts0:Post) - OPTIONAL MATCH (this_posts0)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) + MATCH (this)-[this_has_post0_relationship:HAS_POST]->(this_posts0:Post) + OPTIONAL MATCH (this_posts0)<-[:HAS_POST]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WHERE ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault))) SET this_posts0.id = $this_update_posts0_id WITH this, this_posts0 CALL { WITH this_posts0 - MATCH (this_posts0)<-[this_posts0_creator_User_unique:\`HAS_POST\`]-(:User) + MATCH (this_posts0)<-[this_posts0_creator_User_unique:HAS_POST]-(:User) WITH count(this_posts0_creator_User_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDPost.creator required exactly once', [0]) RETURN c AS this_posts0_creator_User_unique_ignored @@ -651,8 +651,8 @@ describe("Cypher Auth Where", () => { WITH * CALL { WITH this - MATCH (this)-[update_this0:\`HAS_POST\`]->(update_this1:\`Post\`) - OPTIONAL MATCH (update_this1)<-[:\`HAS_POST\`]-(update_this2:\`User\`) + MATCH (this)-[update_this0:HAS_POST]->(update_this1:Post) + OPTIONAL MATCH (update_this1)<-[:HAS_POST]-(update_this2:User) WITH *, count(update_this2) AS creatorCount WITH * WHERE ($isAuthenticated = true AND (creatorCount <> 0 AND update_this2.id = coalesce($jwt.sub, $jwtDefault))) @@ -693,7 +693,7 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) DETACH DELETE this" @@ -728,7 +728,7 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE (this.name = $param0 AND ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault))) DETACH DELETE this" @@ -764,15 +764,15 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) - OPTIONAL MATCH (this_posts0)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this_posts0)<-[:HAS_POST]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WITH * CALL { WITH * - OPTIONAL MATCH (this)-[this_posts0_relationship:\`HAS_POST\`]->(this_posts0:Post) + OPTIONAL MATCH (this)-[this_posts0_relationship:HAS_POST]->(this_posts0:Post) WHERE ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault))) WITH this_posts0_relationship, collect(DISTINCT this_posts0) AS this_posts0_to_delete CALL { @@ -828,7 +828,7 @@ describe("Cypher Auth Where", () => { CALL { WITH this0 OPTIONAL MATCH (this0_posts_connect0_node:Post) - OPTIONAL MATCH (this0_posts_connect0_node)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this0_posts_connect0_node)<-[:HAS_POST]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WHERE (($isAuthenticated = true AND this0.id = coalesce($jwt.sub, $jwtDefault)) AND ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault)))) CALL { @@ -838,7 +838,7 @@ describe("Cypher Auth Where", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_posts_connect0_node - MERGE (this0)-[:\`HAS_POST\`]->(this0_posts_connect0_node) + MERGE (this0)-[:HAS_POST]->(this0_posts_connect0_node) } } WITH this0, this0_posts_connect0_node @@ -846,7 +846,7 @@ describe("Cypher Auth Where", () => { } RETURN this0 } - RETURN [ this0 { .id } ] AS data" + RETURN [this0 { .id }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -902,7 +902,7 @@ describe("Cypher Auth Where", () => { CALL { WITH this0 OPTIONAL MATCH (this0_posts_connect0_node:Post) - OPTIONAL MATCH (this0_posts_connect0_node)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this0_posts_connect0_node)<-[:HAS_POST]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WHERE this0_posts_connect0_node.id = $this0_posts_connect0_node_param0 AND (($isAuthenticated = true AND this0.id = coalesce($jwt.sub, $jwtDefault)) AND ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault)))) CALL { @@ -912,7 +912,7 @@ describe("Cypher Auth Where", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_posts_connect0_node - MERGE (this0)-[:\`HAS_POST\`]->(this0_posts_connect0_node) + MERGE (this0)-[:HAS_POST]->(this0_posts_connect0_node) } } WITH this0, this0_posts_connect0_node @@ -920,7 +920,7 @@ describe("Cypher Auth Where", () => { } RETURN this0 } - RETURN [ this0 { .id } ] AS data" + RETURN [this0 { .id }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -959,14 +959,14 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) WITH this CALL { WITH this OPTIONAL MATCH (this_posts0_connect0_node:Post) - OPTIONAL MATCH (this_posts0_connect0_node)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this_posts0_connect0_node)<-[:HAS_POST]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WHERE (($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) AND ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault)))) CALL { @@ -976,7 +976,7 @@ describe("Cypher Auth Where", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_posts0_connect0_node - MERGE (this)-[:\`HAS_POST\`]->(this_posts0_connect0_node) + MERGE (this)-[:HAS_POST]->(this_posts0_connect0_node) } } WITH this, this_posts0_connect0_node @@ -1017,14 +1017,14 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) WITH this CALL { WITH this OPTIONAL MATCH (this_posts0_connect0_node:Post) - OPTIONAL MATCH (this_posts0_connect0_node)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this_posts0_connect0_node)<-[:HAS_POST]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WHERE this_posts0_connect0_node.id = $this_posts0_connect0_node_param0 AND (($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) AND ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault)))) CALL { @@ -1034,7 +1034,7 @@ describe("Cypher Auth Where", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_posts0_connect0_node - MERGE (this)-[:\`HAS_POST\`]->(this_posts0_connect0_node) + MERGE (this)-[:HAS_POST]->(this_posts0_connect0_node) } } WITH this, this_posts0_connect0_node @@ -1076,14 +1076,14 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) WITH this CALL { WITH this OPTIONAL MATCH (this_connect_posts0_node:Post) - OPTIONAL MATCH (this_connect_posts0_node)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this_connect_posts0_node)<-[:HAS_POST]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WHERE (($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) AND ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault)))) CALL { @@ -1093,7 +1093,7 @@ describe("Cypher Auth Where", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_posts0_node - MERGE (this)-[:\`HAS_POST\`]->(this_connect_posts0_node) + MERGE (this)-[:HAS_POST]->(this_connect_posts0_node) } } WITH this, this_connect_posts0_node @@ -1135,14 +1135,14 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) WITH this CALL { WITH this OPTIONAL MATCH (this_connect_posts0_node:Post) - OPTIONAL MATCH (this_connect_posts0_node)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this_connect_posts0_node)<-[:HAS_POST]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WHERE this_connect_posts0_node.id = $this_connect_posts0_node_param0 AND (($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) AND ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault)))) CALL { @@ -1152,7 +1152,7 @@ describe("Cypher Auth Where", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_posts0_node - MERGE (this)-[:\`HAS_POST\`]->(this_connect_posts0_node) + MERGE (this)-[:HAS_POST]->(this_connect_posts0_node) } } WITH this, this_connect_posts0_node @@ -1195,14 +1195,14 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_posts0_disconnect0_rel:\`HAS_POST\`]->(this_posts0_disconnect0:Post) - OPTIONAL MATCH (this_posts0_disconnect0)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this)-[this_posts0_disconnect0_rel:HAS_POST]->(this_posts0_disconnect0:Post) + OPTIONAL MATCH (this_posts0_disconnect0)<-[:HAS_POST]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WHERE (($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) AND ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault)))) CALL { @@ -1248,14 +1248,14 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_posts0_disconnect0_rel:\`HAS_POST\`]->(this_posts0_disconnect0:Post) - OPTIONAL MATCH (this_posts0_disconnect0)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this)-[this_posts0_disconnect0_rel:HAS_POST]->(this_posts0_disconnect0:Post) + OPTIONAL MATCH (this_posts0_disconnect0)<-[:HAS_POST]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WHERE this_posts0_disconnect0.id = $updateUsers_args_update_posts0_disconnect0_where_Post_this_posts0_disconnect0param0 AND (($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) AND ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault)))) CALL { @@ -1321,14 +1321,14 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_disconnect_posts0_rel:\`HAS_POST\`]->(this_disconnect_posts0:Post) - OPTIONAL MATCH (this_disconnect_posts0)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this)-[this_disconnect_posts0_rel:HAS_POST]->(this_disconnect_posts0:Post) + OPTIONAL MATCH (this_disconnect_posts0)<-[:HAS_POST]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WHERE (($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) AND ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault)))) CALL { @@ -1386,14 +1386,14 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_disconnect_posts0_rel:\`HAS_POST\`]->(this_disconnect_posts0:Post) - OPTIONAL MATCH (this_disconnect_posts0)<-[:\`HAS_POST\`]-(authorization_this0:\`User\`) + OPTIONAL MATCH (this)-[this_disconnect_posts0_rel:HAS_POST]->(this_disconnect_posts0:Post) + OPTIONAL MATCH (this_disconnect_posts0)<-[:HAS_POST]-(authorization_this0:User) WITH *, count(authorization_this0) AS creatorCount WHERE this_disconnect_posts0.id = $updateUsers_args_disconnect_posts0_where_Post_this_disconnect_posts0param0 AND (($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)) AND ($isAuthenticated = true AND (creatorCount <> 0 AND authorization_this0.id = coalesce($jwt.sub, $jwtDefault)))) CALL { diff --git a/packages/graphql/tests/tck/directives/authorization/projection-connection-union.test.ts b/packages/graphql/tests/tck/directives/authorization/projection-connection-union.test.ts index be99195917..054bed68ba 100644 --- a/packages/graphql/tests/tck/directives/authorization/projection-connection-union.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/projection-connection-union.test.ts @@ -88,21 +88,21 @@ describe("Cypher Auth Projection On Connections On Unions", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { WITH this CALL { WITH this - MATCH (this)-[this0:\`PUBLISHED\`]->(this1:\`Post\`) - OPTIONAL MATCH (this1)<-[:\`HAS_POST\`]-(this2:\`User\`) + MATCH (this)-[this0:PUBLISHED]->(this1:Post) + OPTIONAL MATCH (this1)<-[:HAS_POST]-(this2:User) WITH *, count(this2) AS creatorCount WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (creatorCount <> 0 AND this2.id = coalesce($jwt.sub, $jwtDefault))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { WITH this1 - MATCH (this1:\`Post\`)<-[this3:\`HAS_POST\`]-(this4:\`User\`) + MATCH (this1:Post)<-[this3:HAS_POST]-(this4:User) WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this4.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH { node: { name: this4.name } } AS edge WITH collect(edge) AS edges diff --git a/packages/graphql/tests/tck/directives/authorization/projection-connection.test.ts b/packages/graphql/tests/tck/directives/authorization/projection-connection.test.ts index 7d2ed5fd91..5750c2f42c 100644 --- a/packages/graphql/tests/tck/directives/authorization/projection-connection.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/projection-connection.test.ts @@ -78,13 +78,13 @@ describe("Cypher Auth Projection On Connections", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { WITH this - MATCH (this)-[this0:\`HAS_POST\`]->(this1:\`Post\`) - OPTIONAL MATCH (this1)<-[:\`HAS_POST\`]-(this2:\`User\`) + MATCH (this)-[this0:HAS_POST]->(this1:Post) + OPTIONAL MATCH (this1)<-[:HAS_POST]-(this2:User) WITH *, count(this2) AS creatorCount WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (creatorCount <> 0 AND this2.id = coalesce($jwt.sub, $jwtDefault))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) @@ -137,19 +137,19 @@ describe("Cypher Auth Projection On Connections", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { WITH this - MATCH (this)-[this0:\`HAS_POST\`]->(this1:\`Post\`) - OPTIONAL MATCH (this1)<-[:\`HAS_POST\`]-(this2:\`User\`) + MATCH (this)-[this0:HAS_POST]->(this1:Post) + OPTIONAL MATCH (this1)<-[:HAS_POST]-(this2:User) WITH *, count(this2) AS creatorCount WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (creatorCount <> 0 AND this2.id = coalesce($jwt.sub, $jwtDefault))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { WITH this1 - MATCH (this1:\`Post\`)<-[this3:\`HAS_POST\`]-(this4:\`User\`) + MATCH (this1:Post)<-[this3:HAS_POST]-(this4:User) WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this4.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH { node: { name: this4.name } } AS edge WITH collect(edge) AS edges diff --git a/packages/graphql/tests/tck/directives/authorization/projection-interface-relationships.test.ts b/packages/graphql/tests/tck/directives/authorization/projection-interface-relationships.test.ts index b171ab8097..9a9e15bc48 100644 --- a/packages/graphql/tests/tck/directives/authorization/projection-interface-relationships.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/projection-interface-relationships.test.ts @@ -89,17 +89,17 @@ describe("Auth projections for interface relationship fields", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this CALL { WITH * - MATCH (this)-[this0:\`ACTED_IN\`]->(this1:\`Movie\`) + MATCH (this)-[this0:ACTED_IN]->(this1:Movie) WITH this1 { __resolveType: \\"Movie\\", __id: id(this), .runtime, .title } AS this1 RETURN this1 AS var2 UNION WITH * - MATCH (this)-[this3:\`ACTED_IN\`]->(this4:\`Series\`) + MATCH (this)-[this3:ACTED_IN]->(this4:Series) WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this4.episodes = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this4 { __resolveType: \\"Series\\", __id: id(this), .episodes, .title } AS this4 RETURN this4 AS var2 diff --git a/packages/graphql/tests/tck/directives/authorization/projection.test.ts b/packages/graphql/tests/tck/directives/authorization/projection.test.ts index 08cbae9dd7..1453e831b6 100644 --- a/packages/graphql/tests/tck/directives/authorization/projection.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/projection.test.ts @@ -67,7 +67,7 @@ describe("Cypher Auth Projection", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH this WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) SET this.id = $this_update_id @@ -112,7 +112,7 @@ describe("Cypher Auth Projection", () => { "UNWIND $create_param3 AS create_var1 CALL { WITH create_var1 - CREATE (create_this0:\`User\`) + CREATE (create_this0:User) SET create_this0.id = create_var1.id RETURN create_this0 diff --git a/packages/graphql/tests/tck/directives/autogenerate.test.ts b/packages/graphql/tests/tck/directives/autogenerate.test.ts index ce8071eb2a..68ab265639 100644 --- a/packages/graphql/tests/tck/directives/autogenerate.test.ts +++ b/packages/graphql/tests/tck/directives/autogenerate.test.ts @@ -57,7 +57,7 @@ describe("Cypher autogenerate directive", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`Movie\`) + CREATE (create_this1:Movie) SET create_this1.name = create_var0.name, create_this1.id = randomUUID() @@ -93,7 +93,7 @@ describe("Cypher autogenerate directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) SET this.name = $this_update_name RETURN collect(DISTINCT this { .id, .name }) AS data" `); diff --git a/packages/graphql/tests/tck/directives/coalesce.test.ts b/packages/graphql/tests/tck/directives/coalesce.test.ts index e4d76ea8ea..7886a0feb7 100644 --- a/packages/graphql/tests/tck/directives/coalesce.test.ts +++ b/packages/graphql/tests/tck/directives/coalesce.test.ts @@ -97,7 +97,7 @@ describe("Cypher coalesce()", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WHERE (coalesce(this.id, \\"00000000-00000000-00000000-00000000\\") = $param0 AND coalesce(this.name, \\"Jane Smith\\") =~ $param1 AND NOT (this.verified = $param2) AND this.numberOfFriends > $param3 AND coalesce(this.rating, 2.5) < $param4 AND coalesce(this.fromInterface, \\"From Interface\\") = $param5 AND coalesce(this.toBeOverridden, \\"Overridden\\") = $param6) RETURN this { .name } AS this" `); @@ -153,7 +153,7 @@ describe("Cypher coalesce()", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE coalesce(this.status, \\"ACTIVE\\") = $param0 RETURN this { .id, .status } AS this" `); @@ -210,10 +210,10 @@ describe("Cypher coalesce()", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this - MATCH (this)-[this0:\`ACTED_IN\`]->(this1:\`Movie\`) + MATCH (this)-[this0:ACTED_IN]->(this1:Movie) WHERE coalesce(this1.status, \\"ACTIVE\\") = $param0 WITH { node: { id: this1.id, status: this1.status } } AS edge WITH collect(edge) AS edges @@ -268,11 +268,11 @@ describe("Cypher coalesce()", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this - MATCH (this)-[this0:\`ACTED_IN\`]->(this1:\`Movie\`) - WHERE coalesce(this1.statuses, [ \\"ACTIVE\\", \\"INACTIVE\\" ]) = $param0 + MATCH (this)-[this0:ACTED_IN]->(this1:Movie) + WHERE coalesce(this1.statuses, [\\"ACTIVE\\", \\"INACTIVE\\"]) = $param0 WITH { node: { id: this1.id, statuses: this1.statuses } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount diff --git a/packages/graphql/tests/tck/directives/customResolver.test.ts b/packages/graphql/tests/tck/directives/customResolver.test.ts index 3a4f052521..9463f41e4f 100644 --- a/packages/graphql/tests/tck/directives/customResolver.test.ts +++ b/packages/graphql/tests/tck/directives/customResolver.test.ts @@ -60,7 +60,7 @@ describe("@customResolver directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) RETURN this { .firstName } AS this" `); @@ -81,7 +81,7 @@ describe("@customResolver directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) RETURN this { .firstName, .lastName, .fullName } AS this" `); @@ -101,7 +101,7 @@ describe("@customResolver directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) RETURN this { .firstName, .fullName, .lastName } AS this" `); @@ -120,7 +120,7 @@ describe("@customResolver directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) RETURN this { .fullName, .firstName, .lastName } AS this" `); @@ -163,7 +163,7 @@ describe("@customResolver directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) RETURN this { .firstName, .fullName } AS this" `); @@ -182,7 +182,7 @@ describe("@customResolver directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) RETURN this { .fullName } AS this" `); @@ -245,13 +245,13 @@ describe("@customResolver directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) CALL { WITH this - MATCH (this)-[this0:\`LIVES_AT\`]->(this1:\`Address\`) + MATCH (this)-[this0:LIVES_AT]->(this1:Address) CALL { WITH this1 - MATCH (this1)-[this2:\`IN_CITY\`]->(this3:\`City\`) + MATCH (this1)-[this2:IN_CITY]->(this3:City) WITH this3 { .name, .population } AS this3 RETURN head(collect(this3)) AS var4 } @@ -276,7 +276,7 @@ describe("@customResolver directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) RETURN this { .firstName } AS this" `); @@ -301,13 +301,13 @@ describe("@customResolver directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) CALL { WITH this - MATCH (this)-[this0:\`LIVES_AT\`]->(this1:\`Address\`) + MATCH (this)-[this0:LIVES_AT]->(this1:Address) CALL { WITH this1 - MATCH (this1)-[this2:\`IN_CITY\`]->(this3:\`City\`) + MATCH (this1)-[this2:IN_CITY]->(this3:City) WITH this3 { .population, .name } AS this3 RETURN head(collect(this3)) AS var4 } @@ -332,13 +332,13 @@ describe("@customResolver directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) CALL { WITH this - MATCH (this)-[this0:\`LIVES_AT\`]->(this1:\`Address\`) + MATCH (this)-[this0:LIVES_AT]->(this1:Address) CALL { WITH this1 - MATCH (this1)-[this2:\`IN_CITY\`]->(this3:\`City\`) + MATCH (this1)-[this2:IN_CITY]->(this3:City) WITH this3 { .name, .population } AS this3 RETURN head(collect(this3)) AS var4 } @@ -410,17 +410,17 @@ describe("@customResolver directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Author\`) + "MATCH (this:Author) CALL { WITH this CALL { WITH * - MATCH (this)-[this0:\`WROTE\`]->(this1:\`Book\`) + MATCH (this)-[this0:WROTE]->(this1:Book) WITH this1 { __resolveType: \\"Book\\", __id: id(this), .title } AS this1 RETURN this1 AS var2 UNION WITH * - MATCH (this)-[this3:\`WROTE\`]->(this4:\`Journal\`) + MATCH (this)-[this3:WROTE]->(this4:Journal) WITH this4 { __resolveType: \\"Journal\\", __id: id(this), .subject } AS this4 RETURN this4 AS var2 } @@ -445,7 +445,7 @@ describe("@customResolver directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Author\`) + "MATCH (this:Author) RETURN this { .name } AS this" `); @@ -469,17 +469,17 @@ describe("@customResolver directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Author\`) + "MATCH (this:Author) CALL { WITH this CALL { WITH * - MATCH (this)-[this0:\`WROTE\`]->(this1:\`Book\`) + MATCH (this)-[this0:WROTE]->(this1:Book) WITH this1 { __resolveType: \\"Book\\", __id: id(this), .title } AS this1 RETURN this1 AS var2 UNION WITH * - MATCH (this)-[this3:\`WROTE\`]->(this4:\`Journal\`) + MATCH (this)-[this3:WROTE]->(this4:Journal) WITH this4 { __resolveType: \\"Journal\\", __id: id(this), .subject } AS this4 RETURN this4 AS var2 } @@ -504,17 +504,17 @@ describe("@customResolver directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Author\`) + "MATCH (this:Author) CALL { WITH this CALL { WITH * - MATCH (this)-[this0:\`WROTE\`]->(this1:\`Book\`) + MATCH (this)-[this0:WROTE]->(this1:Book) WITH this1 { __resolveType: \\"Book\\", __id: id(this), .title } AS this1 RETURN this1 AS var2 UNION WITH * - MATCH (this)-[this3:\`WROTE\`]->(this4:\`Journal\`) + MATCH (this)-[this3:WROTE]->(this4:Journal) WITH this4 { __resolveType: \\"Journal\\", __id: id(this), .subject } AS this4 RETURN this4 AS var2 } @@ -591,17 +591,17 @@ describe("@customResolver directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Author\`) + "MATCH (this:Author) CALL { WITH this CALL { WITH * - MATCH (this)-[this0:\`WROTE\`]->(this1:\`Book\`) + MATCH (this)-[this0:WROTE]->(this1:Book) WITH this1 { __resolveType: \\"Book\\", __id: id(this), .title, .publicationYear } AS this1 RETURN this1 AS var2 UNION WITH * - MATCH (this)-[this3:\`WROTE\`]->(this4:\`Journal\`) + MATCH (this)-[this3:WROTE]->(this4:Journal) WITH this4 { __resolveType: \\"Journal\\", __id: id(this), .subject, .publicationYear } AS this4 RETURN this4 AS var2 } @@ -626,7 +626,7 @@ describe("@customResolver directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Author\`) + "MATCH (this:Author) RETURN this { .name } AS this" `); @@ -650,17 +650,17 @@ describe("@customResolver directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Author\`) + "MATCH (this:Author) CALL { WITH this CALL { WITH * - MATCH (this)-[this0:\`WROTE\`]->(this1:\`Book\`) + MATCH (this)-[this0:WROTE]->(this1:Book) WITH this1 { __resolveType: \\"Book\\", __id: id(this), .title, .publicationYear } AS this1 RETURN this1 AS var2 UNION WITH * - MATCH (this)-[this3:\`WROTE\`]->(this4:\`Journal\`) + MATCH (this)-[this3:WROTE]->(this4:Journal) WITH this4 { __resolveType: \\"Journal\\", __id: id(this), .subject, .publicationYear } AS this4 RETURN this4 AS var2 } @@ -685,17 +685,17 @@ describe("@customResolver directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Author\`) + "MATCH (this:Author) CALL { WITH this CALL { WITH * - MATCH (this)-[this0:\`WROTE\`]->(this1:\`Book\`) + MATCH (this)-[this0:WROTE]->(this1:Book) WITH this1 { __resolveType: \\"Book\\", __id: id(this), .title, .publicationYear } AS this1 RETURN this1 AS var2 UNION WITH * - MATCH (this)-[this3:\`WROTE\`]->(this4:\`Journal\`) + MATCH (this)-[this3:WROTE]->(this4:Journal) WITH this4 { __resolveType: \\"Journal\\", __id: id(this), .subject, .publicationYear } AS this4 RETURN this4 AS var2 } diff --git a/packages/graphql/tests/tck/directives/cypher.test.ts b/packages/graphql/tests/tck/directives/cypher.test.ts index bc08545538..d45be4e2f7 100644 --- a/packages/graphql/tests/tck/directives/cypher.test.ts +++ b/packages/graphql/tests/tck/directives/cypher.test.ts @@ -134,7 +134,7 @@ describe("Cypher directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this CALL { @@ -164,7 +164,7 @@ describe("Cypher directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this CALL { @@ -193,7 +193,7 @@ describe("Cypher directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WITH * LIMIT $param0 CALL { @@ -231,7 +231,7 @@ describe("Cypher directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this CALL { @@ -276,7 +276,7 @@ describe("Cypher directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this CALL { @@ -333,7 +333,7 @@ describe("Cypher directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this CALL { @@ -407,7 +407,7 @@ describe("Cypher directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this CALL { @@ -471,7 +471,7 @@ describe("Cypher directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this CALL { @@ -483,7 +483,7 @@ describe("Cypher directive", () => { } WITH n AS this0 WITH * - WHERE (this0:\`Movie\` OR this0:\`TVShow\`) + WHERE (this0:Movie OR this0:TVShow) WITH *, this0 AS this1 CALL { WITH this1 @@ -520,8 +520,8 @@ describe("Cypher directive", () => { RETURN head(collect(this5 { .name })) AS this5 } RETURN collect(CASE - WHEN this0:\`Movie\` THEN this0 { __resolveType: \\"Movie\\", .id, .title, topActor: this2, actors: this3 } - WHEN this0:\`TVShow\` THEN this0 { __resolveType: \\"TVShow\\", .id, .title, topActor: this5 } + WHEN this0:Movie THEN this0 { __resolveType: \\"Movie\\", .id, .title, topActor: this2, actors: this3 } + WHEN this0:TVShow THEN this0 { __resolveType: \\"TVShow\\", .id, .title, topActor: this5 } END) AS this0 } RETURN this { movieOrTVShow: this0 } AS this" @@ -548,7 +548,7 @@ describe("Cypher directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this CALL { @@ -560,10 +560,10 @@ describe("Cypher directive", () => { } WITH n AS this0 WITH * - WHERE (this0:\`Movie\` OR this0:\`TVShow\`) + WHERE (this0:Movie OR this0:TVShow) RETURN collect(CASE - WHEN this0:\`Movie\` THEN this0 { __resolveType: \\"Movie\\" } - WHEN this0:\`TVShow\` THEN this0 { __resolveType: \\"TVShow\\" } + WHEN this0:Movie THEN this0 { __resolveType: \\"Movie\\" } + WHEN this0:TVShow THEN this0 { __resolveType: \\"TVShow\\" } END) AS this0 } RETURN this { movieOrTVShow: this0 } AS this" @@ -624,7 +624,7 @@ describe("Cypher directive", () => { WITH m as this CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WITH this1 { .name } AS this1 RETURN collect(this1) AS var2 } @@ -685,7 +685,7 @@ describe("Cypher directive", () => { WITH m as this CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WITH this1 { .name } AS this1 RETURN collect(this1) AS var2 } @@ -738,7 +738,7 @@ describe("Cypher directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this CALL { @@ -750,7 +750,7 @@ describe("Cypher directive", () => { WITH m AS this0 CALL { WITH this0 - MATCH (this0)<-[this1:\`ACTED_IN\`]-(this2:\`Actor\`) + MATCH (this0)<-[this1:ACTED_IN]-(this2:Actor) WITH this2 { .name } AS this2 RETURN collect(this2) AS var3 } diff --git a/packages/graphql/tests/tck/directives/interface-relationships/create/connect.test.ts b/packages/graphql/tests/tck/directives/interface-relationships/create/connect.test.ts index 6508b5831b..1488eb97b1 100644 --- a/packages/graphql/tests/tck/directives/interface-relationships/create/connect.test.ts +++ b/packages/graphql/tests/tck/directives/interface-relationships/create/connect.test.ts @@ -104,7 +104,7 @@ describe("Interface Relationships - Create connect", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_actedIn_connect0_node - MERGE (this0)-[this0_actedIn_connect0_relationship:\`ACTED_IN\`]->(this0_actedIn_connect0_node) + MERGE (this0)-[this0_actedIn_connect0_relationship:ACTED_IN]->(this0_actedIn_connect0_node) SET this0_actedIn_connect0_relationship.screenTime = $this0_actedIn_connect0_relationship_screenTime } } @@ -122,7 +122,7 @@ describe("Interface Relationships - Create connect", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_actedIn_connect1_node - MERGE (this0)-[this0_actedIn_connect1_relationship:\`ACTED_IN\`]->(this0_actedIn_connect1_node) + MERGE (this0)-[this0_actedIn_connect1_relationship:ACTED_IN]->(this0_actedIn_connect1_node) SET this0_actedIn_connect1_relationship.screenTime = $this0_actedIn_connect1_relationship_screenTime } } @@ -135,19 +135,19 @@ describe("Interface Relationships - Create connect", () => { WITH this0 CALL { WITH * - MATCH (this0)-[create_this0:\`ACTED_IN\`]->(create_this1:\`Movie\`) + MATCH (this0)-[create_this0:ACTED_IN]->(create_this1:Movie) WITH create_this1 { __resolveType: \\"Movie\\", __id: id(this0), .runtime, .title } AS create_this1 RETURN create_this1 AS create_var2 UNION WITH * - MATCH (this0)-[create_this3:\`ACTED_IN\`]->(create_this4:\`Series\`) + MATCH (this0)-[create_this3:ACTED_IN]->(create_this4:Series) WITH create_this4 { __resolveType: \\"Series\\", __id: id(this0), .episodes, .title } AS create_this4 RETURN create_this4 AS create_var2 } WITH create_var2 RETURN collect(create_var2) AS create_var2 } - RETURN [ this0 { .name, actedIn: create_var2 } ] AS data" + RETURN [this0 { .name, actedIn: create_var2 }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` diff --git a/packages/graphql/tests/tck/directives/interface-relationships/create/create.test.ts b/packages/graphql/tests/tck/directives/interface-relationships/create/create.test.ts index bb30a7ef96..e3c68c4b6a 100644 --- a/packages/graphql/tests/tck/directives/interface-relationships/create/create.test.ts +++ b/packages/graphql/tests/tck/directives/interface-relationships/create/create.test.ts @@ -99,7 +99,7 @@ describe("Interface Relationships - Create create", () => { CREATE (this0_actedInMovie0_node:Movie) SET this0_actedInMovie0_node.title = $this0_actedInMovie0_node_title SET this0_actedInMovie0_node.runtime = $this0_actedInMovie0_node_runtime - MERGE (this0)-[this0_actedInMovie0_relationship:\`ACTED_IN\`]->(this0_actedInMovie0_node) + MERGE (this0)-[this0_actedInMovie0_relationship:ACTED_IN]->(this0_actedInMovie0_node) SET this0_actedInMovie0_relationship.screenTime = $this0_actedInMovie0_relationship_screenTime RETURN this0 } @@ -107,19 +107,19 @@ describe("Interface Relationships - Create create", () => { WITH this0 CALL { WITH * - MATCH (this0)-[create_this0:\`ACTED_IN\`]->(create_this1:\`Movie\`) + MATCH (this0)-[create_this0:ACTED_IN]->(create_this1:Movie) WITH create_this1 { __resolveType: \\"Movie\\", __id: id(this0), .runtime, .title } AS create_this1 RETURN create_this1 AS create_var2 UNION WITH * - MATCH (this0)-[create_this3:\`ACTED_IN\`]->(create_this4:\`Series\`) + MATCH (this0)-[create_this3:ACTED_IN]->(create_this4:Series) WITH create_this4 { __resolveType: \\"Series\\", __id: id(this0), .episodes, .title } AS create_this4 RETURN create_this4 AS create_var2 } WITH create_var2 RETURN collect(create_var2) AS create_var2 } - RETURN [ this0 { .name, actedIn: create_var2 } ] AS data" + RETURN [this0 { .name, actedIn: create_var2 }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` diff --git a/packages/graphql/tests/tck/directives/interface-relationships/delete/delete.test.ts b/packages/graphql/tests/tck/directives/interface-relationships/delete/delete.test.ts index 0ce17de751..c02bda532e 100644 --- a/packages/graphql/tests/tck/directives/interface-relationships/delete/delete.test.ts +++ b/packages/graphql/tests/tck/directives/interface-relationships/delete/delete.test.ts @@ -73,11 +73,11 @@ describe("Interface Relationships - Delete delete", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WITH * CALL { WITH * - OPTIONAL MATCH (this)-[this_actedIn_Movie0_relationship:\`ACTED_IN\`]->(this_actedIn_Movie0:Movie) + OPTIONAL MATCH (this)-[this_actedIn_Movie0_relationship:ACTED_IN]->(this_actedIn_Movie0:Movie) WHERE this_actedIn_Movie0.title STARTS WITH $this_deleteActors_args_delete_actedIn0_where_this_actedIn_Movie0param0 WITH this_actedIn_Movie0_relationship, collect(DISTINCT this_actedIn_Movie0) AS this_actedIn_Movie0_to_delete CALL { @@ -89,7 +89,7 @@ describe("Interface Relationships - Delete delete", () => { WITH * CALL { WITH * - OPTIONAL MATCH (this)-[this_actedIn_Series0_relationship:\`ACTED_IN\`]->(this_actedIn_Series0:Series) + OPTIONAL MATCH (this)-[this_actedIn_Series0_relationship:ACTED_IN]->(this_actedIn_Series0:Series) WHERE this_actedIn_Series0.title STARTS WITH $this_deleteActors_args_delete_actedIn0_where_this_actedIn_Series0param0 WITH this_actedIn_Series0_relationship, collect(DISTINCT this_actedIn_Series0) AS this_actedIn_Series0_to_delete CALL { @@ -144,16 +144,16 @@ describe("Interface Relationships - Delete delete", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WITH * CALL { WITH * - OPTIONAL MATCH (this)-[this_actedIn_Movie0_relationship:\`ACTED_IN\`]->(this_actedIn_Movie0:Movie) + OPTIONAL MATCH (this)-[this_actedIn_Movie0_relationship:ACTED_IN]->(this_actedIn_Movie0:Movie) WHERE this_actedIn_Movie0.title STARTS WITH $this_deleteActors_args_delete_actedIn0_where_this_actedIn_Movie0param0 WITH * CALL { WITH * - OPTIONAL MATCH (this_actedIn_Movie0)<-[this_actedIn_Movie0_actors0_relationship:\`ACTED_IN\`]-(this_actedIn_Movie0_actors0:Actor) + OPTIONAL MATCH (this_actedIn_Movie0)<-[this_actedIn_Movie0_actors0_relationship:ACTED_IN]-(this_actedIn_Movie0_actors0:Actor) WHERE this_actedIn_Movie0_actors0.name = $this_deleteActors_args_delete_actedIn0_delete_actors0_where_this_actedIn_Movie0_actors0param0 WITH this_actedIn_Movie0_actors0_relationship, collect(DISTINCT this_actedIn_Movie0_actors0) AS this_actedIn_Movie0_actors0_to_delete CALL { @@ -172,12 +172,12 @@ describe("Interface Relationships - Delete delete", () => { WITH * CALL { WITH * - OPTIONAL MATCH (this)-[this_actedIn_Series0_relationship:\`ACTED_IN\`]->(this_actedIn_Series0:Series) + OPTIONAL MATCH (this)-[this_actedIn_Series0_relationship:ACTED_IN]->(this_actedIn_Series0:Series) WHERE this_actedIn_Series0.title STARTS WITH $this_deleteActors_args_delete_actedIn0_where_this_actedIn_Series0param0 WITH * CALL { WITH * - OPTIONAL MATCH (this_actedIn_Series0)<-[this_actedIn_Series0_actors0_relationship:\`ACTED_IN\`]-(this_actedIn_Series0_actors0:Actor) + OPTIONAL MATCH (this_actedIn_Series0)<-[this_actedIn_Series0_actors0_relationship:ACTED_IN]-(this_actedIn_Series0_actors0:Actor) WHERE this_actedIn_Series0_actors0.name = $this_deleteActors_args_delete_actedIn0_delete_actors0_where_this_actedIn_Series0_actors0param0 WITH this_actedIn_Series0_actors0_relationship, collect(DISTINCT this_actedIn_Series0_actors0) AS this_actedIn_Series0_actors0_to_delete CALL { @@ -252,16 +252,16 @@ describe("Interface Relationships - Delete delete", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WITH * CALL { WITH * - OPTIONAL MATCH (this)-[this_actedIn_Movie0_relationship:\`ACTED_IN\`]->(this_actedIn_Movie0:Movie) + OPTIONAL MATCH (this)-[this_actedIn_Movie0_relationship:ACTED_IN]->(this_actedIn_Movie0:Movie) WHERE this_actedIn_Movie0.title STARTS WITH $this_deleteActors_args_delete_actedIn0_where_this_actedIn_Movie0param0 WITH * CALL { WITH * - OPTIONAL MATCH (this_actedIn_Movie0)<-[this_actedIn_Movie0_actors0_relationship:\`ACTED_IN\`]-(this_actedIn_Movie0_actors0:Actor) + OPTIONAL MATCH (this_actedIn_Movie0)<-[this_actedIn_Movie0_actors0_relationship:ACTED_IN]-(this_actedIn_Movie0_actors0:Actor) WHERE this_actedIn_Movie0_actors0.name = $this_deleteActors_args_delete_actedIn0_delete__on_Movie0_actors0_where_this_actedIn_Movie0_actors0param0 WITH this_actedIn_Movie0_actors0_relationship, collect(DISTINCT this_actedIn_Movie0_actors0) AS this_actedIn_Movie0_actors0_to_delete CALL { @@ -280,7 +280,7 @@ describe("Interface Relationships - Delete delete", () => { WITH * CALL { WITH * - OPTIONAL MATCH (this)-[this_actedIn_Series0_relationship:\`ACTED_IN\`]->(this_actedIn_Series0:Series) + OPTIONAL MATCH (this)-[this_actedIn_Series0_relationship:ACTED_IN]->(this_actedIn_Series0:Series) WHERE this_actedIn_Series0.title STARTS WITH $this_deleteActors_args_delete_actedIn0_where_this_actedIn_Series0param0 WITH this_actedIn_Series0_relationship, collect(DISTINCT this_actedIn_Series0) AS this_actedIn_Series0_to_delete CALL { @@ -356,16 +356,16 @@ describe("Interface Relationships - Delete delete", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WITH * CALL { WITH * - OPTIONAL MATCH (this)-[this_actedIn_Movie0_relationship:\`ACTED_IN\`]->(this_actedIn_Movie0:Movie) + OPTIONAL MATCH (this)-[this_actedIn_Movie0_relationship:ACTED_IN]->(this_actedIn_Movie0:Movie) WHERE this_actedIn_Movie0.title STARTS WITH $this_deleteActors_args_delete_actedIn0_where_this_actedIn_Movie0param0 WITH * CALL { WITH * - OPTIONAL MATCH (this_actedIn_Movie0)<-[this_actedIn_Movie0_actors0_relationship:\`ACTED_IN\`]-(this_actedIn_Movie0_actors0:Actor) + OPTIONAL MATCH (this_actedIn_Movie0)<-[this_actedIn_Movie0_actors0_relationship:ACTED_IN]-(this_actedIn_Movie0_actors0:Actor) WHERE this_actedIn_Movie0_actors0.name = $this_deleteActors_args_delete_actedIn0_delete__on_Movie0_actors0_where_this_actedIn_Movie0_actors0param0 WITH this_actedIn_Movie0_actors0_relationship, collect(DISTINCT this_actedIn_Movie0_actors0) AS this_actedIn_Movie0_actors0_to_delete CALL { @@ -384,12 +384,12 @@ describe("Interface Relationships - Delete delete", () => { WITH * CALL { WITH * - OPTIONAL MATCH (this)-[this_actedIn_Series0_relationship:\`ACTED_IN\`]->(this_actedIn_Series0:Series) + OPTIONAL MATCH (this)-[this_actedIn_Series0_relationship:ACTED_IN]->(this_actedIn_Series0:Series) WHERE this_actedIn_Series0.title STARTS WITH $this_deleteActors_args_delete_actedIn0_where_this_actedIn_Series0param0 WITH * CALL { WITH * - OPTIONAL MATCH (this_actedIn_Series0)<-[this_actedIn_Series0_actors0_relationship:\`ACTED_IN\`]-(this_actedIn_Series0_actors0:Actor) + OPTIONAL MATCH (this_actedIn_Series0)<-[this_actedIn_Series0_actors0_relationship:ACTED_IN]-(this_actedIn_Series0_actors0:Actor) WHERE this_actedIn_Series0_actors0.name = $this_deleteActors_args_delete_actedIn0_delete_actors0_where_this_actedIn_Series0_actors0param0 WITH this_actedIn_Series0_actors0_relationship, collect(DISTINCT this_actedIn_Series0_actors0) AS this_actedIn_Series0_actors0_to_delete CALL { diff --git a/packages/graphql/tests/tck/directives/interface-relationships/read.test.ts b/packages/graphql/tests/tck/directives/interface-relationships/read.test.ts index 3f23050288..7980fdbe31 100644 --- a/packages/graphql/tests/tck/directives/interface-relationships/read.test.ts +++ b/packages/graphql/tests/tck/directives/interface-relationships/read.test.ts @@ -78,17 +78,17 @@ describe("Interface Relationships", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this CALL { WITH * - MATCH (this)-[this0:\`ACTED_IN\`]->(this1:\`Movie\`) + MATCH (this)-[this0:ACTED_IN]->(this1:Movie) WITH this1 { __resolveType: \\"Movie\\", __id: id(this), .runtime, .title } AS this1 RETURN this1 AS var2 UNION WITH * - MATCH (this)-[this3:\`ACTED_IN\`]->(this4:\`Series\`) + MATCH (this)-[this3:ACTED_IN]->(this4:Series) WITH this4 { __resolveType: \\"Series\\", __id: id(this), .episodes, .title } AS this4 RETURN this4 AS var2 } @@ -121,17 +121,17 @@ describe("Interface Relationships", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this CALL { WITH * - MATCH (this)-[this0:\`CURRENTLY_ACTING_IN\`]->(this1:\`Movie\`) + MATCH (this)-[this0:CURRENTLY_ACTING_IN]->(this1:Movie) WITH this1 { __resolveType: \\"Movie\\", __id: id(this), .runtime, .title } AS this1 RETURN this1 AS var2 UNION WITH * - MATCH (this)-[this3:\`CURRENTLY_ACTING_IN\`]->(this4:\`Series\`) + MATCH (this)-[this3:CURRENTLY_ACTING_IN]->(this4:Series) WITH this4 { __resolveType: \\"Series\\", __id: id(this), .episodes, .title } AS this4 RETURN this4 AS var2 } @@ -164,17 +164,17 @@ describe("Interface Relationships", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this CALL { WITH * - MATCH (this)-[this0:\`ACTED_IN\`]->(this1:\`Movie\`) + MATCH (this)-[this0:ACTED_IN]->(this1:Movie) WITH this1 { __resolveType: \\"Movie\\", __id: id(this), .runtime, .title } AS this1 RETURN this1 AS var2 UNION WITH * - MATCH (this)-[this3:\`ACTED_IN\`]->(this4:\`Series\`) + MATCH (this)-[this3:ACTED_IN]->(this4:Series) WITH this4 { __resolveType: \\"Series\\", __id: id(this), .episodes, .title } AS this4 RETURN this4 AS var2 } @@ -218,12 +218,12 @@ describe("Interface Relationships", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this CALL { WITH * - MATCH (this)-[this0:\`ACTED_IN\`]->(this1:\`Movie\`) + MATCH (this)-[this0:ACTED_IN]->(this1:Movie) WHERE this1.title STARTS WITH $param0 WITH this1 { __resolveType: \\"Movie\\", __id: id(this), .runtime, .title } AS this1 RETURN this1 AS var2 @@ -261,18 +261,18 @@ describe("Interface Relationships", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this CALL { WITH * - MATCH (this)-[this0:\`ACTED_IN\`]->(this1:\`Movie\`) + MATCH (this)-[this0:ACTED_IN]->(this1:Movie) WHERE this1.title STARTS WITH $param0 WITH this1 { __resolveType: \\"Movie\\", __id: id(this), .runtime, .title } AS this1 RETURN this1 AS var2 UNION WITH * - MATCH (this)-[this3:\`ACTED_IN\`]->(this4:\`Series\`) + MATCH (this)-[this3:ACTED_IN]->(this4:Series) WHERE this4.title STARTS WITH $param1 WITH this4 { __resolveType: \\"Series\\", __id: id(this), .episodes, .title } AS this4 RETURN this4 AS var2 @@ -316,17 +316,17 @@ describe("Interface Relationships", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this CALL { WITH this - MATCH (this)-[this0:\`ACTED_IN\`]->(this1:\`Movie\`) + MATCH (this)-[this0:ACTED_IN]->(this1:Movie) WITH { screenTime: this0.screenTime, node: { __resolveType: \\"Movie\\", __id: id(this1), runtime: this1.runtime, title: this1.title } } AS edge RETURN edge UNION WITH this - MATCH (this)-[this2:\`ACTED_IN\`]->(this3:\`Series\`) + MATCH (this)-[this2:ACTED_IN]->(this3:Series) WITH { screenTime: this2.screenTime, node: { __resolveType: \\"Series\\", __id: id(this3), episodes: this3.episodes, title: this3.title } } AS edge RETURN edge } @@ -365,18 +365,18 @@ describe("Interface Relationships", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this CALL { WITH this - MATCH (this)-[this0:\`ACTED_IN\`]->(this1:\`Movie\`) + MATCH (this)-[this0:ACTED_IN]->(this1:Movie) WHERE (this0.screenTime > $param0 AND this1.title STARTS WITH $param1) WITH { screenTime: this0.screenTime, node: { __resolveType: \\"Movie\\", __id: id(this1), runtime: this1.runtime, title: this1.title } } AS edge RETURN edge UNION WITH this - MATCH (this)-[this2:\`ACTED_IN\`]->(this3:\`Series\`) + MATCH (this)-[this2:ACTED_IN]->(this3:Series) WHERE (this2.screenTime > $param2 AND this3.title STARTS WITH $param3) WITH { screenTime: this2.screenTime, node: { __resolveType: \\"Series\\", __id: id(this3), episodes: this3.episodes, title: this3.title } } AS edge RETURN edge @@ -428,12 +428,12 @@ describe("Interface Relationships", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this CALL { WITH this - MATCH (this)-[this0:\`ACTED_IN\`]->(this1:\`Movie\`) + MATCH (this)-[this0:ACTED_IN]->(this1:Movie) WHERE (this0.screenTime > $param0 AND this1.title STARTS WITH $param1) WITH { screenTime: this0.screenTime, node: { __resolveType: \\"Movie\\", __id: id(this1), runtime: this1.runtime, title: this1.title } } AS edge RETURN edge @@ -486,18 +486,18 @@ describe("Interface Relationships", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this CALL { WITH this - MATCH (this)-[this0:\`ACTED_IN\`]->(this1:\`Movie\`) + MATCH (this)-[this0:ACTED_IN]->(this1:Movie) WHERE (this0.screenTime > $param0 AND this1.title STARTS WITH $param1) WITH { screenTime: this0.screenTime, node: { __resolveType: \\"Movie\\", __id: id(this1), runtime: this1.runtime, title: this1.title } } AS edge RETURN edge UNION WITH this - MATCH (this)-[this2:\`ACTED_IN\`]->(this3:\`Series\`) + MATCH (this)-[this2:ACTED_IN]->(this3:Series) WHERE (this2.screenTime > $param2 AND this3.title STARTS WITH $param3) WITH { screenTime: this2.screenTime, node: { __resolveType: \\"Series\\", __id: id(this3), episodes: this3.episodes, title: this3.title } } AS edge RETURN edge diff --git a/packages/graphql/tests/tck/directives/interface-relationships/update/connect.test.ts b/packages/graphql/tests/tck/directives/interface-relationships/update/connect.test.ts index abe4dbc2d3..5f9e31844f 100644 --- a/packages/graphql/tests/tck/directives/interface-relationships/update/connect.test.ts +++ b/packages/graphql/tests/tck/directives/interface-relationships/update/connect.test.ts @@ -76,7 +76,7 @@ describe("Interface Relationships - Update connect", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WITH this CALL { WITH this @@ -89,7 +89,7 @@ describe("Interface Relationships - Update connect", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_actedIn0_node - MERGE (this)-[this_connect_actedIn0_relationship:\`ACTED_IN\`]->(this_connect_actedIn0_node) + MERGE (this)-[this_connect_actedIn0_relationship:ACTED_IN]->(this_connect_actedIn0_node) SET this_connect_actedIn0_relationship.screenTime = $this_connect_actedIn0_relationship_screenTime } } @@ -107,7 +107,7 @@ describe("Interface Relationships - Update connect", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_actedIn1_node - MERGE (this)-[this_connect_actedIn1_relationship:\`ACTED_IN\`]->(this_connect_actedIn1_node) + MERGE (this)-[this_connect_actedIn1_relationship:ACTED_IN]->(this_connect_actedIn1_node) SET this_connect_actedIn1_relationship.screenTime = $this_connect_actedIn1_relationship_screenTime } } @@ -157,7 +157,7 @@ describe("Interface Relationships - Update connect", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WITH this CALL { WITH this @@ -170,7 +170,7 @@ describe("Interface Relationships - Update connect", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_actedIn0_node - MERGE (this)-[this_connect_actedIn0_relationship:\`ACTED_IN\`]->(this_connect_actedIn0_node) + MERGE (this)-[this_connect_actedIn0_relationship:ACTED_IN]->(this_connect_actedIn0_node) SET this_connect_actedIn0_relationship.screenTime = $this_connect_actedIn0_relationship_screenTime } } @@ -186,7 +186,7 @@ describe("Interface Relationships - Update connect", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this_connect_actedIn0_node UNWIND connectedNodes as this_connect_actedIn0_node_actors0_node - MERGE (this_connect_actedIn0_node)<-[this_connect_actedIn0_node_actors0_relationship:\`ACTED_IN\`]-(this_connect_actedIn0_node_actors0_node) + MERGE (this_connect_actedIn0_node)<-[this_connect_actedIn0_node_actors0_relationship:ACTED_IN]-(this_connect_actedIn0_node_actors0_node) SET this_connect_actedIn0_node_actors0_relationship.screenTime = $this_connect_actedIn0_node_actors0_relationship_screenTime } } @@ -206,7 +206,7 @@ describe("Interface Relationships - Update connect", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_actedIn1_node - MERGE (this)-[this_connect_actedIn1_relationship:\`ACTED_IN\`]->(this_connect_actedIn1_node) + MERGE (this)-[this_connect_actedIn1_relationship:ACTED_IN]->(this_connect_actedIn1_node) SET this_connect_actedIn1_relationship.screenTime = $this_connect_actedIn1_relationship_screenTime } } @@ -222,7 +222,7 @@ describe("Interface Relationships - Update connect", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this_connect_actedIn1_node UNWIND connectedNodes as this_connect_actedIn1_node_actors0_node - MERGE (this_connect_actedIn1_node)<-[this_connect_actedIn1_node_actors0_relationship:\`ACTED_IN\`]-(this_connect_actedIn1_node_actors0_node) + MERGE (this_connect_actedIn1_node)<-[this_connect_actedIn1_node_actors0_relationship:ACTED_IN]-(this_connect_actedIn1_node_actors0_node) SET this_connect_actedIn1_node_actors0_relationship.screenTime = $this_connect_actedIn1_node_actors0_relationship_screenTime } } @@ -288,7 +288,7 @@ describe("Interface Relationships - Update connect", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WITH this CALL { WITH this @@ -301,7 +301,7 @@ describe("Interface Relationships - Update connect", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_actedIn0_node - MERGE (this)-[this_connect_actedIn0_relationship:\`ACTED_IN\`]->(this_connect_actedIn0_node) + MERGE (this)-[this_connect_actedIn0_relationship:ACTED_IN]->(this_connect_actedIn0_node) SET this_connect_actedIn0_relationship.screenTime = $this_connect_actedIn0_relationship_screenTime } } @@ -317,7 +317,7 @@ describe("Interface Relationships - Update connect", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this_connect_actedIn0_node UNWIND connectedNodes as this_connect_actedIn0_node_on_Movie0_actors0_node - MERGE (this_connect_actedIn0_node)<-[this_connect_actedIn0_node_on_Movie0_actors0_relationship:\`ACTED_IN\`]-(this_connect_actedIn0_node_on_Movie0_actors0_node) + MERGE (this_connect_actedIn0_node)<-[this_connect_actedIn0_node_on_Movie0_actors0_relationship:ACTED_IN]-(this_connect_actedIn0_node_on_Movie0_actors0_node) SET this_connect_actedIn0_node_on_Movie0_actors0_relationship.screenTime = $this_connect_actedIn0_node_on_Movie0_actors0_relationship_screenTime } } @@ -337,7 +337,7 @@ describe("Interface Relationships - Update connect", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_actedIn1_node - MERGE (this)-[this_connect_actedIn1_relationship:\`ACTED_IN\`]->(this_connect_actedIn1_node) + MERGE (this)-[this_connect_actedIn1_relationship:ACTED_IN]->(this_connect_actedIn1_node) SET this_connect_actedIn1_relationship.screenTime = $this_connect_actedIn1_relationship_screenTime } } @@ -402,7 +402,7 @@ describe("Interface Relationships - Update connect", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WITH this CALL { WITH this @@ -415,7 +415,7 @@ describe("Interface Relationships - Update connect", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_actedIn0_node - MERGE (this)-[this_connect_actedIn0_relationship:\`ACTED_IN\`]->(this_connect_actedIn0_node) + MERGE (this)-[this_connect_actedIn0_relationship:ACTED_IN]->(this_connect_actedIn0_node) SET this_connect_actedIn0_relationship.screenTime = $this_connect_actedIn0_relationship_screenTime } } @@ -431,7 +431,7 @@ describe("Interface Relationships - Update connect", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this_connect_actedIn0_node UNWIND connectedNodes as this_connect_actedIn0_node_on_Movie0_actors0_node - MERGE (this_connect_actedIn0_node)<-[this_connect_actedIn0_node_on_Movie0_actors0_relationship:\`ACTED_IN\`]-(this_connect_actedIn0_node_on_Movie0_actors0_node) + MERGE (this_connect_actedIn0_node)<-[this_connect_actedIn0_node_on_Movie0_actors0_relationship:ACTED_IN]-(this_connect_actedIn0_node_on_Movie0_actors0_node) SET this_connect_actedIn0_node_on_Movie0_actors0_relationship.screenTime = $this_connect_actedIn0_node_on_Movie0_actors0_relationship_screenTime } } @@ -451,7 +451,7 @@ describe("Interface Relationships - Update connect", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_actedIn1_node - MERGE (this)-[this_connect_actedIn1_relationship:\`ACTED_IN\`]->(this_connect_actedIn1_node) + MERGE (this)-[this_connect_actedIn1_relationship:ACTED_IN]->(this_connect_actedIn1_node) SET this_connect_actedIn1_relationship.screenTime = $this_connect_actedIn1_relationship_screenTime } } @@ -467,7 +467,7 @@ describe("Interface Relationships - Update connect", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this_connect_actedIn1_node UNWIND connectedNodes as this_connect_actedIn1_node_actors0_node - MERGE (this_connect_actedIn1_node)<-[this_connect_actedIn1_node_actors0_relationship:\`ACTED_IN\`]-(this_connect_actedIn1_node_actors0_node) + MERGE (this_connect_actedIn1_node)<-[this_connect_actedIn1_node_actors0_relationship:ACTED_IN]-(this_connect_actedIn1_node_actors0_node) SET this_connect_actedIn1_node_actors0_relationship.screenTime = $this_connect_actedIn1_node_actors0_relationship_screenTime } } diff --git a/packages/graphql/tests/tck/directives/interface-relationships/update/create.test.ts b/packages/graphql/tests/tck/directives/interface-relationships/update/create.test.ts index 6e6738fe80..3ec959a750 100644 --- a/packages/graphql/tests/tck/directives/interface-relationships/update/create.test.ts +++ b/packages/graphql/tests/tck/directives/interface-relationships/update/create.test.ts @@ -84,23 +84,23 @@ describe("Interface Relationships - Update create", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CREATE (this_create_actedIn_Movie0_node_Movie:Movie) SET this_create_actedIn_Movie0_node_Movie.title = $this_create_actedIn_Movie0_node_Movie_title SET this_create_actedIn_Movie0_node_Movie.runtime = $this_create_actedIn_Movie0_node_Movie_runtime - MERGE (this)-[this_create_actedIn_Movie0_relationship:\`ACTED_IN\`]->(this_create_actedIn_Movie0_node_Movie) + MERGE (this)-[this_create_actedIn_Movie0_relationship:ACTED_IN]->(this_create_actedIn_Movie0_node_Movie) SET this_create_actedIn_Movie0_relationship.screenTime = $this_create_actedIn_Movie0_relationship_screenTime WITH * CALL { WITH this CALL { WITH * - MATCH (this)-[update_this0:\`ACTED_IN\`]->(update_this1:\`Movie\`) + MATCH (this)-[update_this0:ACTED_IN]->(update_this1:Movie) WITH update_this1 { __resolveType: \\"Movie\\", __id: id(this), .runtime, .title } AS update_this1 RETURN update_this1 AS update_var2 UNION WITH * - MATCH (this)-[update_this3:\`ACTED_IN\`]->(update_this4:\`Series\`) + MATCH (this)-[update_this3:ACTED_IN]->(update_this4:Series) WITH update_this4 { __resolveType: \\"Series\\", __id: id(this), .episodes, .title } AS update_this4 RETURN update_this4 AS update_var2 } diff --git a/packages/graphql/tests/tck/directives/interface-relationships/update/delete.test.ts b/packages/graphql/tests/tck/directives/interface-relationships/update/delete.test.ts index 40a6a0de2d..acd920929b 100644 --- a/packages/graphql/tests/tck/directives/interface-relationships/update/delete.test.ts +++ b/packages/graphql/tests/tck/directives/interface-relationships/update/delete.test.ts @@ -74,11 +74,11 @@ describe("Interface Relationships - Update delete", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WITH * CALL { WITH * - OPTIONAL MATCH (this)-[this_delete_actedIn_Movie0_relationship:\`ACTED_IN\`]->(this_delete_actedIn_Movie0:Movie) + OPTIONAL MATCH (this)-[this_delete_actedIn_Movie0_relationship:ACTED_IN]->(this_delete_actedIn_Movie0:Movie) WHERE this_delete_actedIn_Movie0.title STARTS WITH $updateActors_args_delete_actedIn0_where_this_delete_actedIn_Movie0param0 WITH this_delete_actedIn_Movie0_relationship, collect(DISTINCT this_delete_actedIn_Movie0) AS this_delete_actedIn_Movie0_to_delete CALL { @@ -90,7 +90,7 @@ describe("Interface Relationships - Update delete", () => { WITH * CALL { WITH * - OPTIONAL MATCH (this)-[this_delete_actedIn_Series0_relationship:\`ACTED_IN\`]->(this_delete_actedIn_Series0:Series) + OPTIONAL MATCH (this)-[this_delete_actedIn_Series0_relationship:ACTED_IN]->(this_delete_actedIn_Series0:Series) WHERE this_delete_actedIn_Series0.title STARTS WITH $updateActors_args_delete_actedIn0_where_this_delete_actedIn_Series0param0 WITH this_delete_actedIn_Series0_relationship, collect(DISTINCT this_delete_actedIn_Series0) AS this_delete_actedIn_Series0_to_delete CALL { @@ -148,16 +148,16 @@ describe("Interface Relationships - Update delete", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WITH * CALL { WITH * - OPTIONAL MATCH (this)-[this_delete_actedIn_Movie0_relationship:\`ACTED_IN\`]->(this_delete_actedIn_Movie0:Movie) + OPTIONAL MATCH (this)-[this_delete_actedIn_Movie0_relationship:ACTED_IN]->(this_delete_actedIn_Movie0:Movie) WHERE this_delete_actedIn_Movie0.title STARTS WITH $updateActors_args_delete_actedIn0_where_this_delete_actedIn_Movie0param0 WITH * CALL { WITH * - OPTIONAL MATCH (this_delete_actedIn_Movie0)<-[this_delete_actedIn_Movie0_actors0_relationship:\`ACTED_IN\`]-(this_delete_actedIn_Movie0_actors0:Actor) + OPTIONAL MATCH (this_delete_actedIn_Movie0)<-[this_delete_actedIn_Movie0_actors0_relationship:ACTED_IN]-(this_delete_actedIn_Movie0_actors0:Actor) WHERE this_delete_actedIn_Movie0_actors0.name = $updateActors_args_delete_actedIn0_delete_actors0_where_this_delete_actedIn_Movie0_actors0param0 WITH this_delete_actedIn_Movie0_actors0_relationship, collect(DISTINCT this_delete_actedIn_Movie0_actors0) AS this_delete_actedIn_Movie0_actors0_to_delete CALL { @@ -176,12 +176,12 @@ describe("Interface Relationships - Update delete", () => { WITH * CALL { WITH * - OPTIONAL MATCH (this)-[this_delete_actedIn_Series0_relationship:\`ACTED_IN\`]->(this_delete_actedIn_Series0:Series) + OPTIONAL MATCH (this)-[this_delete_actedIn_Series0_relationship:ACTED_IN]->(this_delete_actedIn_Series0:Series) WHERE this_delete_actedIn_Series0.title STARTS WITH $updateActors_args_delete_actedIn0_where_this_delete_actedIn_Series0param0 WITH * CALL { WITH * - OPTIONAL MATCH (this_delete_actedIn_Series0)<-[this_delete_actedIn_Series0_actors0_relationship:\`ACTED_IN\`]-(this_delete_actedIn_Series0_actors0:Actor) + OPTIONAL MATCH (this_delete_actedIn_Series0)<-[this_delete_actedIn_Series0_actors0_relationship:ACTED_IN]-(this_delete_actedIn_Series0_actors0:Actor) WHERE this_delete_actedIn_Series0_actors0.name = $updateActors_args_delete_actedIn0_delete_actors0_where_this_delete_actedIn_Series0_actors0param0 WITH this_delete_actedIn_Series0_actors0_relationship, collect(DISTINCT this_delete_actedIn_Series0_actors0) AS this_delete_actedIn_Series0_actors0_to_delete CALL { @@ -259,16 +259,16 @@ describe("Interface Relationships - Update delete", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WITH * CALL { WITH * - OPTIONAL MATCH (this)-[this_delete_actedIn_Movie0_relationship:\`ACTED_IN\`]->(this_delete_actedIn_Movie0:Movie) + OPTIONAL MATCH (this)-[this_delete_actedIn_Movie0_relationship:ACTED_IN]->(this_delete_actedIn_Movie0:Movie) WHERE this_delete_actedIn_Movie0.title STARTS WITH $updateActors_args_delete_actedIn0_where_this_delete_actedIn_Movie0param0 WITH * CALL { WITH * - OPTIONAL MATCH (this_delete_actedIn_Movie0)<-[this_delete_actedIn_Movie0_actors0_relationship:\`ACTED_IN\`]-(this_delete_actedIn_Movie0_actors0:Actor) + OPTIONAL MATCH (this_delete_actedIn_Movie0)<-[this_delete_actedIn_Movie0_actors0_relationship:ACTED_IN]-(this_delete_actedIn_Movie0_actors0:Actor) WHERE this_delete_actedIn_Movie0_actors0.name = $updateActors_args_delete_actedIn0_delete__on_Movie0_actors0_where_this_delete_actedIn_Movie0_actors0param0 WITH this_delete_actedIn_Movie0_actors0_relationship, collect(DISTINCT this_delete_actedIn_Movie0_actors0) AS this_delete_actedIn_Movie0_actors0_to_delete CALL { @@ -287,7 +287,7 @@ describe("Interface Relationships - Update delete", () => { WITH * CALL { WITH * - OPTIONAL MATCH (this)-[this_delete_actedIn_Series0_relationship:\`ACTED_IN\`]->(this_delete_actedIn_Series0:Series) + OPTIONAL MATCH (this)-[this_delete_actedIn_Series0_relationship:ACTED_IN]->(this_delete_actedIn_Series0:Series) WHERE this_delete_actedIn_Series0.title STARTS WITH $updateActors_args_delete_actedIn0_where_this_delete_actedIn_Series0param0 WITH this_delete_actedIn_Series0_relationship, collect(DISTINCT this_delete_actedIn_Series0) AS this_delete_actedIn_Series0_to_delete CALL { @@ -366,16 +366,16 @@ describe("Interface Relationships - Update delete", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WITH * CALL { WITH * - OPTIONAL MATCH (this)-[this_delete_actedIn_Movie0_relationship:\`ACTED_IN\`]->(this_delete_actedIn_Movie0:Movie) + OPTIONAL MATCH (this)-[this_delete_actedIn_Movie0_relationship:ACTED_IN]->(this_delete_actedIn_Movie0:Movie) WHERE this_delete_actedIn_Movie0.title STARTS WITH $updateActors_args_delete_actedIn0_where_this_delete_actedIn_Movie0param0 WITH * CALL { WITH * - OPTIONAL MATCH (this_delete_actedIn_Movie0)<-[this_delete_actedIn_Movie0_actors0_relationship:\`ACTED_IN\`]-(this_delete_actedIn_Movie0_actors0:Actor) + OPTIONAL MATCH (this_delete_actedIn_Movie0)<-[this_delete_actedIn_Movie0_actors0_relationship:ACTED_IN]-(this_delete_actedIn_Movie0_actors0:Actor) WHERE this_delete_actedIn_Movie0_actors0.name = $updateActors_args_delete_actedIn0_delete__on_Movie0_actors0_where_this_delete_actedIn_Movie0_actors0param0 WITH this_delete_actedIn_Movie0_actors0_relationship, collect(DISTINCT this_delete_actedIn_Movie0_actors0) AS this_delete_actedIn_Movie0_actors0_to_delete CALL { @@ -394,12 +394,12 @@ describe("Interface Relationships - Update delete", () => { WITH * CALL { WITH * - OPTIONAL MATCH (this)-[this_delete_actedIn_Series0_relationship:\`ACTED_IN\`]->(this_delete_actedIn_Series0:Series) + OPTIONAL MATCH (this)-[this_delete_actedIn_Series0_relationship:ACTED_IN]->(this_delete_actedIn_Series0:Series) WHERE this_delete_actedIn_Series0.title STARTS WITH $updateActors_args_delete_actedIn0_where_this_delete_actedIn_Series0param0 WITH * CALL { WITH * - OPTIONAL MATCH (this_delete_actedIn_Series0)<-[this_delete_actedIn_Series0_actors0_relationship:\`ACTED_IN\`]-(this_delete_actedIn_Series0_actors0:Actor) + OPTIONAL MATCH (this_delete_actedIn_Series0)<-[this_delete_actedIn_Series0_actors0_relationship:ACTED_IN]-(this_delete_actedIn_Series0_actors0:Actor) WHERE this_delete_actedIn_Series0_actors0.name = $updateActors_args_delete_actedIn0_delete_actors0_where_this_delete_actedIn_Series0_actors0param0 WITH this_delete_actedIn_Series0_actors0_relationship, collect(DISTINCT this_delete_actedIn_Series0_actors0) AS this_delete_actedIn_Series0_actors0_to_delete CALL { diff --git a/packages/graphql/tests/tck/directives/interface-relationships/update/disconnect.test.ts b/packages/graphql/tests/tck/directives/interface-relationships/update/disconnect.test.ts index 007d32f45b..1189a8b0e1 100644 --- a/packages/graphql/tests/tck/directives/interface-relationships/update/disconnect.test.ts +++ b/packages/graphql/tests/tck/directives/interface-relationships/update/disconnect.test.ts @@ -74,11 +74,11 @@ describe("Interface Relationships - Update disconnect", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_disconnect_actedIn0_rel:\`ACTED_IN\`]->(this_disconnect_actedIn0:Movie) + OPTIONAL MATCH (this)-[this_disconnect_actedIn0_rel:ACTED_IN]->(this_disconnect_actedIn0:Movie) WHERE this_disconnect_actedIn0.title STARTS WITH $updateActors_args_disconnect_actedIn0_where_Movie_this_disconnect_actedIn0param0 CALL { WITH this_disconnect_actedIn0, this_disconnect_actedIn0_rel, this @@ -90,7 +90,7 @@ describe("Interface Relationships - Update disconnect", () => { } CALL { WITH this - OPTIONAL MATCH (this)-[this_disconnect_actedIn0_rel:\`ACTED_IN\`]->(this_disconnect_actedIn0:Series) + OPTIONAL MATCH (this)-[this_disconnect_actedIn0_rel:ACTED_IN]->(this_disconnect_actedIn0:Series) WHERE this_disconnect_actedIn0.title STARTS WITH $updateActors_args_disconnect_actedIn0_where_Series_this_disconnect_actedIn0param0 CALL { WITH this_disconnect_actedIn0, this_disconnect_actedIn0_rel, this @@ -149,11 +149,11 @@ describe("Interface Relationships - Update disconnect", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_disconnect_actedIn0_rel:\`ACTED_IN\`]->(this_disconnect_actedIn0:Movie) + OPTIONAL MATCH (this)-[this_disconnect_actedIn0_rel:ACTED_IN]->(this_disconnect_actedIn0:Movie) WHERE this_disconnect_actedIn0.title STARTS WITH $updateActors_args_disconnect_actedIn0_where_Movie_this_disconnect_actedIn0param0 CALL { WITH this_disconnect_actedIn0, this_disconnect_actedIn0_rel, this @@ -163,7 +163,7 @@ describe("Interface Relationships - Update disconnect", () => { } CALL { WITH this, this_disconnect_actedIn0 - OPTIONAL MATCH (this_disconnect_actedIn0)<-[this_disconnect_actedIn0_actors0_rel:\`ACTED_IN\`]-(this_disconnect_actedIn0_actors0:Actor) + OPTIONAL MATCH (this_disconnect_actedIn0)<-[this_disconnect_actedIn0_actors0_rel:ACTED_IN]-(this_disconnect_actedIn0_actors0:Actor) WHERE this_disconnect_actedIn0_actors0.name = $updateActors_args_disconnect_actedIn0_disconnect_actors0_where_Actor_this_disconnect_actedIn0_actors0param0 CALL { WITH this_disconnect_actedIn0_actors0, this_disconnect_actedIn0_actors0_rel, this_disconnect_actedIn0 @@ -177,7 +177,7 @@ describe("Interface Relationships - Update disconnect", () => { } CALL { WITH this - OPTIONAL MATCH (this)-[this_disconnect_actedIn0_rel:\`ACTED_IN\`]->(this_disconnect_actedIn0:Series) + OPTIONAL MATCH (this)-[this_disconnect_actedIn0_rel:ACTED_IN]->(this_disconnect_actedIn0:Series) WHERE this_disconnect_actedIn0.title STARTS WITH $updateActors_args_disconnect_actedIn0_where_Series_this_disconnect_actedIn0param0 CALL { WITH this_disconnect_actedIn0, this_disconnect_actedIn0_rel, this @@ -187,7 +187,7 @@ describe("Interface Relationships - Update disconnect", () => { } CALL { WITH this, this_disconnect_actedIn0 - OPTIONAL MATCH (this_disconnect_actedIn0)<-[this_disconnect_actedIn0_actors0_rel:\`ACTED_IN\`]-(this_disconnect_actedIn0_actors0:Actor) + OPTIONAL MATCH (this_disconnect_actedIn0)<-[this_disconnect_actedIn0_actors0_rel:ACTED_IN]-(this_disconnect_actedIn0_actors0:Actor) WHERE this_disconnect_actedIn0_actors0.name = $updateActors_args_disconnect_actedIn0_disconnect_actors0_where_Actor_this_disconnect_actedIn0_actors0param0 CALL { WITH this_disconnect_actedIn0_actors0, this_disconnect_actedIn0_actors0_rel, this_disconnect_actedIn0 @@ -260,11 +260,11 @@ describe("Interface Relationships - Update disconnect", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_disconnect_actedIn0_rel:\`ACTED_IN\`]->(this_disconnect_actedIn0:Movie) + OPTIONAL MATCH (this)-[this_disconnect_actedIn0_rel:ACTED_IN]->(this_disconnect_actedIn0:Movie) WHERE this_disconnect_actedIn0.title STARTS WITH $updateActors_args_disconnect_actedIn0_where_Movie_this_disconnect_actedIn0param0 CALL { WITH this_disconnect_actedIn0, this_disconnect_actedIn0_rel, this @@ -274,7 +274,7 @@ describe("Interface Relationships - Update disconnect", () => { } CALL { WITH this, this_disconnect_actedIn0 - OPTIONAL MATCH (this_disconnect_actedIn0)<-[this_disconnect_actedIn0_actors0_rel:\`ACTED_IN\`]-(this_disconnect_actedIn0_actors0:Actor) + OPTIONAL MATCH (this_disconnect_actedIn0)<-[this_disconnect_actedIn0_actors0_rel:ACTED_IN]-(this_disconnect_actedIn0_actors0:Actor) WHERE this_disconnect_actedIn0_actors0.name = $updateActors_args_disconnect_actedIn0_disconnect__on_Movie0_actors0_where_Actor_this_disconnect_actedIn0_actors0param0 CALL { WITH this_disconnect_actedIn0_actors0, this_disconnect_actedIn0_actors0_rel, this_disconnect_actedIn0 @@ -288,7 +288,7 @@ describe("Interface Relationships - Update disconnect", () => { } CALL { WITH this - OPTIONAL MATCH (this)-[this_disconnect_actedIn0_rel:\`ACTED_IN\`]->(this_disconnect_actedIn0:Series) + OPTIONAL MATCH (this)-[this_disconnect_actedIn0_rel:ACTED_IN]->(this_disconnect_actedIn0:Series) WHERE this_disconnect_actedIn0.title STARTS WITH $updateActors_args_disconnect_actedIn0_where_Series_this_disconnect_actedIn0param0 CALL { WITH this_disconnect_actedIn0, this_disconnect_actedIn0_rel, this @@ -368,11 +368,11 @@ describe("Interface Relationships - Update disconnect", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_disconnect_actedIn0_rel:\`ACTED_IN\`]->(this_disconnect_actedIn0:Movie) + OPTIONAL MATCH (this)-[this_disconnect_actedIn0_rel:ACTED_IN]->(this_disconnect_actedIn0:Movie) WHERE this_disconnect_actedIn0.title STARTS WITH $updateActors_args_disconnect_actedIn0_where_Movie_this_disconnect_actedIn0param0 CALL { WITH this_disconnect_actedIn0, this_disconnect_actedIn0_rel, this @@ -382,7 +382,7 @@ describe("Interface Relationships - Update disconnect", () => { } CALL { WITH this, this_disconnect_actedIn0 - OPTIONAL MATCH (this_disconnect_actedIn0)<-[this_disconnect_actedIn0_actors0_rel:\`ACTED_IN\`]-(this_disconnect_actedIn0_actors0:Actor) + OPTIONAL MATCH (this_disconnect_actedIn0)<-[this_disconnect_actedIn0_actors0_rel:ACTED_IN]-(this_disconnect_actedIn0_actors0:Actor) WHERE this_disconnect_actedIn0_actors0.name = $updateActors_args_disconnect_actedIn0_disconnect__on_Movie0_actors0_where_Actor_this_disconnect_actedIn0_actors0param0 CALL { WITH this_disconnect_actedIn0_actors0, this_disconnect_actedIn0_actors0_rel, this_disconnect_actedIn0 @@ -396,7 +396,7 @@ describe("Interface Relationships - Update disconnect", () => { } CALL { WITH this - OPTIONAL MATCH (this)-[this_disconnect_actedIn0_rel:\`ACTED_IN\`]->(this_disconnect_actedIn0:Series) + OPTIONAL MATCH (this)-[this_disconnect_actedIn0_rel:ACTED_IN]->(this_disconnect_actedIn0:Series) WHERE this_disconnect_actedIn0.title STARTS WITH $updateActors_args_disconnect_actedIn0_where_Series_this_disconnect_actedIn0param0 CALL { WITH this_disconnect_actedIn0, this_disconnect_actedIn0_rel, this @@ -406,7 +406,7 @@ describe("Interface Relationships - Update disconnect", () => { } CALL { WITH this, this_disconnect_actedIn0 - OPTIONAL MATCH (this_disconnect_actedIn0)<-[this_disconnect_actedIn0_actors0_rel:\`ACTED_IN\`]-(this_disconnect_actedIn0_actors0:Actor) + OPTIONAL MATCH (this_disconnect_actedIn0)<-[this_disconnect_actedIn0_actors0_rel:ACTED_IN]-(this_disconnect_actedIn0_actors0:Actor) WHERE this_disconnect_actedIn0_actors0.name = $updateActors_args_disconnect_actedIn0_disconnect_actors0_where_Actor_this_disconnect_actedIn0_actors0param0 CALL { WITH this_disconnect_actedIn0_actors0, this_disconnect_actedIn0_actors0_rel, this_disconnect_actedIn0 diff --git a/packages/graphql/tests/tck/directives/interface-relationships/update/update.test.ts b/packages/graphql/tests/tck/directives/interface-relationships/update/update.test.ts index 32cd1b0032..21128b2114 100644 --- a/packages/graphql/tests/tck/directives/interface-relationships/update/update.test.ts +++ b/packages/graphql/tests/tck/directives/interface-relationships/update/update.test.ts @@ -78,14 +78,14 @@ describe("Interface Relationships - Update update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WITH this CALL { WITH this WITH this CALL { WITH this - MATCH (this)-[this_acted_in0_relationship:\`ACTED_IN\`]->(this_actedIn0:Movie) + MATCH (this)-[this_acted_in0_relationship:ACTED_IN]->(this_actedIn0:Movie) WHERE this_actedIn0.title = $updateActors_args_update_actedIn0_where_this_actedIn0param0 SET this_actedIn0.title = $this_update_actedIn0_title RETURN count(*) AS update_this_actedIn0 @@ -97,7 +97,7 @@ describe("Interface Relationships - Update update", () => { WITH this CALL { WITH this - MATCH (this)-[this_acted_in0_relationship:\`ACTED_IN\`]->(this_actedIn0:Series) + MATCH (this)-[this_acted_in0_relationship:ACTED_IN]->(this_actedIn0:Series) WHERE this_actedIn0.title = $updateActors_args_update_actedIn0_where_this_actedIn0param0 SET this_actedIn0.title = $this_update_actedIn0_title RETURN count(*) AS update_this_actedIn0 @@ -157,19 +157,19 @@ describe("Interface Relationships - Update update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WITH this CALL { WITH this WITH this CALL { WITH this - MATCH (this)-[this_acted_in0_relationship:\`ACTED_IN\`]->(this_actedIn0:Movie) + MATCH (this)-[this_acted_in0_relationship:ACTED_IN]->(this_actedIn0:Movie) WHERE this_actedIn0.title = $updateActors_args_update_actedIn0_where_this_actedIn0param0 WITH this, this_actedIn0 CALL { WITH this, this_actedIn0 - MATCH (this_actedIn0)<-[this_actedIn0_acted_in0_relationship:\`ACTED_IN\`]-(this_actedIn0_actors0:Actor) + MATCH (this_actedIn0)<-[this_actedIn0_acted_in0_relationship:ACTED_IN]-(this_actedIn0_actors0:Actor) SET this_actedIn0_actors0.name = $this_update_actedIn0_actors0_name RETURN count(*) AS update_this_actedIn0_actors0 } @@ -182,12 +182,12 @@ describe("Interface Relationships - Update update", () => { WITH this CALL { WITH this - MATCH (this)-[this_acted_in0_relationship:\`ACTED_IN\`]->(this_actedIn0:Series) + MATCH (this)-[this_acted_in0_relationship:ACTED_IN]->(this_actedIn0:Series) WHERE this_actedIn0.title = $updateActors_args_update_actedIn0_where_this_actedIn0param0 WITH this, this_actedIn0 CALL { WITH this, this_actedIn0 - MATCH (this_actedIn0)<-[this_actedIn0_acted_in0_relationship:\`ACTED_IN\`]-(this_actedIn0_actors0:Actor) + MATCH (this_actedIn0)<-[this_actedIn0_acted_in0_relationship:ACTED_IN]-(this_actedIn0_actors0:Actor) SET this_actedIn0_actors0.name = $this_update_actedIn0_actors0_name RETURN count(*) AS update_this_actedIn0_actors0 } @@ -258,19 +258,19 @@ describe("Interface Relationships - Update update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WITH this CALL { WITH this WITH this CALL { WITH this - MATCH (this)-[this_acted_in0_relationship:\`ACTED_IN\`]->(this_actedIn0:Movie) + MATCH (this)-[this_acted_in0_relationship:ACTED_IN]->(this_actedIn0:Movie) WHERE this_actedIn0.title = $updateActors_args_update_actedIn0_where_this_actedIn0param0 WITH this, this_actedIn0 CALL { WITH this, this_actedIn0 - MATCH (this_actedIn0)<-[this_actedIn0_acted_in0_relationship:\`ACTED_IN\`]-(this_actedIn0_actors0:Actor) + MATCH (this_actedIn0)<-[this_actedIn0_acted_in0_relationship:ACTED_IN]-(this_actedIn0_actors0:Actor) SET this_actedIn0_actors0.name = $this_update_actedIn0_on_Movie_actors0_name RETURN count(*) AS update_this_actedIn0_actors0 } @@ -283,7 +283,7 @@ describe("Interface Relationships - Update update", () => { WITH this CALL { WITH this - MATCH (this)-[this_acted_in0_relationship:\`ACTED_IN\`]->(this_actedIn0:Series) + MATCH (this)-[this_acted_in0_relationship:ACTED_IN]->(this_actedIn0:Series) WHERE this_actedIn0.title = $updateActors_args_update_actedIn0_where_this_actedIn0param0 RETURN count(*) AS update_this_actedIn0 } @@ -359,19 +359,19 @@ describe("Interface Relationships - Update update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WITH this CALL { WITH this WITH this CALL { WITH this - MATCH (this)-[this_acted_in0_relationship:\`ACTED_IN\`]->(this_actedIn0:Movie) + MATCH (this)-[this_acted_in0_relationship:ACTED_IN]->(this_actedIn0:Movie) WHERE this_actedIn0.title = $updateActors_args_update_actedIn0_where_this_actedIn0param0 WITH this, this_actedIn0 CALL { WITH this, this_actedIn0 - MATCH (this_actedIn0)<-[this_actedIn0_acted_in0_relationship:\`ACTED_IN\`]-(this_actedIn0_actors0:Actor) + MATCH (this_actedIn0)<-[this_actedIn0_acted_in0_relationship:ACTED_IN]-(this_actedIn0_actors0:Actor) SET this_actedIn0_actors0.name = $this_update_actedIn0_on_Movie_actors0_name RETURN count(*) AS update_this_actedIn0_actors0 } @@ -384,12 +384,12 @@ describe("Interface Relationships - Update update", () => { WITH this CALL { WITH this - MATCH (this)-[this_acted_in0_relationship:\`ACTED_IN\`]->(this_actedIn0:Series) + MATCH (this)-[this_acted_in0_relationship:ACTED_IN]->(this_actedIn0:Series) WHERE this_actedIn0.title = $updateActors_args_update_actedIn0_where_this_actedIn0param0 WITH this, this_actedIn0 CALL { WITH this, this_actedIn0 - MATCH (this_actedIn0)<-[this_actedIn0_acted_in0_relationship:\`ACTED_IN\`]-(this_actedIn0_actors0:Actor) + MATCH (this_actedIn0)<-[this_actedIn0_acted_in0_relationship:ACTED_IN]-(this_actedIn0_actors0:Actor) SET this_actedIn0_actors0.name = $this_update_actedIn0_actors0_name RETURN count(*) AS update_this_actedIn0_actors0 } diff --git a/packages/graphql/tests/tck/directives/node/node-additional-labels.test.ts b/packages/graphql/tests/tck/directives/node/node-additional-labels.test.ts index 73da431e8a..47485aa63b 100644 --- a/packages/graphql/tests/tck/directives/node/node-additional-labels.test.ts +++ b/packages/graphql/tests/tck/directives/node/node-additional-labels.test.ts @@ -57,7 +57,7 @@ describe("Node directive with additionalLabels", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Film\`:\`Multimedia\`) + "MATCH (this:Film:Multimedia) RETURN this { .title } AS this" `); @@ -79,10 +79,10 @@ describe("Node directive with additionalLabels", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Film\`:\`Multimedia\`) + "MATCH (this:Film:Multimedia) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`:\`Person\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor:Person) WITH this1 { .name } AS this1 RETURN collect(this1) AS var2 } @@ -114,7 +114,7 @@ describe("Node directive with additionalLabels", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`Film\`:\`Multimedia\`) + CREATE (create_this1:Film:Multimedia) SET create_this1.id = create_var0.id WITH create_this1, create_var0 @@ -122,10 +122,10 @@ describe("Node directive with additionalLabels", () => { WITH create_this1, create_var0 UNWIND create_var0.actors.create AS create_var2 WITH create_var2.node AS create_var3, create_var2.edge AS create_var4, create_this1 - CREATE (create_this5:\`Actor\`:\`Person\`) + CREATE (create_this5:Actor:Person) SET create_this5.name = create_var3.name - MERGE (create_this1)<-[create_this6:\`ACTED_IN\`]-(create_this5) + MERGE (create_this1)<-[create_this6:ACTED_IN]-(create_this5) RETURN collect(NULL) AS create_var7 } RETURN create_this1 @@ -178,7 +178,7 @@ describe("Node directive with additionalLabels", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Film\`:\`Multimedia\`) + "MATCH (this:Film:Multimedia) WHERE this.id = $param0 DETACH DELETE this" `); @@ -204,7 +204,7 @@ describe("Node directive with additionalLabels", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Film\`:\`Multimedia\`) + "MATCH (this:Film:Multimedia) WHERE this.id = $param0 SET this.id = $this_update_id RETURN collect(DISTINCT this { .id }) AS data" diff --git a/packages/graphql/tests/tck/directives/node/node-label-jwt.test.ts b/packages/graphql/tests/tck/directives/node/node-label-jwt.test.ts index 9d97e278df..8662d83747 100644 --- a/packages/graphql/tests/tck/directives/node/node-label-jwt.test.ts +++ b/packages/graphql/tests/tck/directives/node/node-label-jwt.test.ts @@ -62,7 +62,7 @@ describe("Label in Node directive", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Film\`) + "MATCH (this:Film) RETURN this { .title } AS this" `); @@ -85,11 +85,11 @@ describe("Label in Node directive", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`:\`Person\`) + "MATCH (this:Actor:Person) WHERE this.age > $param0 CALL { WITH this - MATCH (this)-[this0:\`ACTED_IN\`]->(this1:\`Film\`) + MATCH (this)-[this0:ACTED_IN]->(this1:Film) WHERE this1.title = $param1 WITH this1 { .title } AS this1 RETURN collect(this1) AS var2 @@ -126,7 +126,7 @@ describe("Label in Node directive", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`Film\`) + CREATE (create_this1:Film) SET create_this1.title = create_var0.title RETURN create_this1 diff --git a/packages/graphql/tests/tck/directives/node/node-label-union.test.ts b/packages/graphql/tests/tck/directives/node/node-label-union.test.ts index 8b2e6bba02..f42a4be08b 100644 --- a/packages/graphql/tests/tck/directives/node/node-label-union.test.ts +++ b/packages/graphql/tests/tck/directives/node/node-label-union.test.ts @@ -67,19 +67,19 @@ describe("Node directive with unions", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Film\`) + "MATCH (this:Film) WHERE this.title = $param0 CALL { WITH this CALL { WITH * - MATCH (this)-[this0:\`SEARCH\`]->(this1:\`Category\`:\`ExtraLabel1\`:\`ExtraLabel2\`) + MATCH (this)-[this0:SEARCH]->(this1:Category:ExtraLabel1:ExtraLabel2) WHERE this1.name = $param1 WITH this1 { __resolveType: \\"Genre\\", __id: id(this), .name } AS this1 RETURN this1 AS var2 UNION WITH * - MATCH (this)-[this3:\`SEARCH\`]->(this4:\`Film\`) + MATCH (this)-[this3:SEARCH]->(this4:Film) WHERE this4.title = $param2 WITH this4 { __resolveType: \\"Movie\\", __id: id(this), .title } AS this4 RETURN this4 AS var2 diff --git a/packages/graphql/tests/tck/directives/node/node-label.test.ts b/packages/graphql/tests/tck/directives/node/node-label.test.ts index 6ae48de110..c294143f2e 100644 --- a/packages/graphql/tests/tck/directives/node/node-label.test.ts +++ b/packages/graphql/tests/tck/directives/node/node-label.test.ts @@ -57,7 +57,7 @@ describe("Label in Node directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Film\`) + "MATCH (this:Film) RETURN this { .title } AS this" `); @@ -79,10 +79,10 @@ describe("Label in Node directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Film\`) + "MATCH (this:Film) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Person\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Person) WITH this1 { .name } AS this1 RETURN collect(this1) AS var2 } @@ -111,10 +111,10 @@ describe("Label in Node directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Film\`) + "MATCH (this:Film) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Person\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Person) WITH { node: { name: this1.name } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount @@ -143,7 +143,7 @@ describe("Label in Node directive", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`Film\`) + CREATE (create_this1:Film) SET create_this1.id = create_var0.id RETURN create_this1 @@ -185,7 +185,7 @@ describe("Label in Node directive", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`Film\`) + CREATE (create_this1:Film) SET create_this1.id = create_var0.id WITH create_this1, create_var0 @@ -193,10 +193,10 @@ describe("Label in Node directive", () => { WITH create_this1, create_var0 UNWIND create_var0.actors.create AS create_var2 WITH create_var2.node AS create_var3, create_var2.edge AS create_var4, create_this1 - CREATE (create_this5:\`Person\`) + CREATE (create_this5:Person) SET create_this5.name = create_var3.name - MERGE (create_this1)<-[create_this6:\`ACTED_IN\`]-(create_this5) + MERGE (create_this1)<-[create_this6:ACTED_IN]-(create_this5) RETURN collect(NULL) AS create_var7 } RETURN create_this1 @@ -251,7 +251,7 @@ describe("Label in Node directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Film\`) + "MATCH (this:Film) WHERE this.id = $param0 SET this.id = $this_update_id RETURN collect(DISTINCT this { .id }) AS data" @@ -285,12 +285,12 @@ describe("Label in Node directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Film\`) + "MATCH (this:Film) WHERE this.id = $param0 WITH this CALL { WITH this - MATCH (this)<-[this_acted_in0_relationship:\`ACTED_IN\`]-(this_actors0:\`Person\`) + MATCH (this)<-[this_acted_in0_relationship:ACTED_IN]-(this_actors0:Person) WHERE this_actors0.name = $updateMovies_args_update_actors0_where_this_actors0param0 SET this_actors0.name = $this_update_actors0_name RETURN count(*) AS update_this_actors0 @@ -342,12 +342,12 @@ describe("Label in Node directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Film\`) + "MATCH (this:Film) WHERE this.id = $param0 WITH this CALL { WITH this - OPTIONAL MATCH (this_connect_actors0_node:\`Person\`) + OPTIONAL MATCH (this_connect_actors0_node:Person) WHERE this_connect_actors0_node.name = $this_connect_actors0_node_param0 CALL { WITH * @@ -356,7 +356,7 @@ describe("Label in Node directive", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_actors0_node - MERGE (this)<-[:\`ACTED_IN\`]-(this_connect_actors0_node) + MERGE (this)<-[:ACTED_IN]-(this_connect_actors0_node) } } WITH this, this_connect_actors0_node @@ -389,12 +389,12 @@ describe("Label in Node directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Film\`) + "MATCH (this:Film) WHERE this.id = $param0 WITH this CALL { WITH this - OPTIONAL MATCH (this)<-[this_disconnect_actors0_rel:\`ACTED_IN\`]-(this_disconnect_actors0:\`Person\`) + OPTIONAL MATCH (this)<-[this_disconnect_actors0_rel:ACTED_IN]-(this_disconnect_actors0:Person) WHERE this_disconnect_actors0.name = $updateMovies_args_disconnect_actors0_where_Actor_this_disconnect_actors0param0 CALL { WITH this_disconnect_actors0, this_disconnect_actors0_rel, this @@ -444,7 +444,7 @@ describe("Label in Node directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Film\`) + "MATCH (this:Film) WHERE this.id = $param0 DETACH DELETE this" `); @@ -468,12 +468,12 @@ describe("Label in Node directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Film\`) + "MATCH (this:Film) WHERE this.id = $param0 WITH * CALL { WITH * - OPTIONAL MATCH (this)<-[this_actors0_relationship:\`ACTED_IN\`]-(this_actors0:\`Person\`) + OPTIONAL MATCH (this)<-[this_actors0_relationship:ACTED_IN]-(this_actors0:Person) WHERE this_actors0.name = $this_deleteMovies_args_delete_actors0_where_this_actors0param0 WITH this_actors0_relationship, collect(DISTINCT this_actors0) AS this_actors0_to_delete CALL { @@ -520,9 +520,9 @@ describe("Label in Node directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Film\`) + "MATCH (this:Film) WHERE EXISTS { - MATCH (this)<-[:\`ACTED_IN\`]-(this0:\`Person\`) + MATCH (this)<-[:ACTED_IN]-(this0:Person) WHERE this0.name = $param0 } DETACH DELETE this" diff --git a/packages/graphql/tests/tck/directives/node/node-with-auth-projection.test.ts b/packages/graphql/tests/tck/directives/node/node-with-auth-projection.test.ts index eda09d8f50..3821e29709 100644 --- a/packages/graphql/tests/tck/directives/node/node-with-auth-projection.test.ts +++ b/packages/graphql/tests/tck/directives/node/node-with-auth-projection.test.ts @@ -74,13 +74,13 @@ describe("Cypher Auth Projection On Connections", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Person\`) + "MATCH (this:Person) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { WITH this - MATCH (this)-[this0:\`HAS_POST\`]->(this1:\`Comment\`) - OPTIONAL MATCH (this1)<-[:\`HAS_POST\`]-(this2:\`Person\`) + MATCH (this)-[this0:HAS_POST]->(this1:Comment) + OPTIONAL MATCH (this1)<-[:HAS_POST]-(this2:Person) WITH *, count(this2) AS creatorCount WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (creatorCount <> 0 AND this2.id = coalesce($jwt.sub, $jwtDefault))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) diff --git a/packages/graphql/tests/tck/directives/node/node-with-auth.test.ts b/packages/graphql/tests/tck/directives/node/node-with-auth.test.ts index 0966afde17..30ce7331fd 100644 --- a/packages/graphql/tests/tck/directives/node/node-with-auth.test.ts +++ b/packages/graphql/tests/tck/directives/node/node-with-auth.test.ts @@ -82,7 +82,7 @@ describe("Node Directive", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Person\`) + "MATCH (this:Person) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN this { .id } AS this" @@ -115,8 +115,8 @@ describe("Node Directive", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Comment\`) - OPTIONAL MATCH (this)<-[:\`HAS_POST\`]-(this0:\`Person\`) + "MATCH (this:Comment) + OPTIONAL MATCH (this)<-[:HAS_POST]-(this0:Person) WITH *, count(this0) AS creatorCount WITH * WHERE ((creatorCount <> 0 AND this0.id = $param0) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $param2 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0])) diff --git a/packages/graphql/tests/tck/directives/plural.test.ts b/packages/graphql/tests/tck/directives/plural.test.ts index 72ab4bcfce..7b98a5cc55 100644 --- a/packages/graphql/tests/tck/directives/plural.test.ts +++ b/packages/graphql/tests/tck/directives/plural.test.ts @@ -50,7 +50,7 @@ describe("Plural directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Tech\`) + "MATCH (this:Tech) RETURN this { .name } AS this" `); @@ -69,7 +69,7 @@ describe("Plural directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Tech\`) + "MATCH (this:Tech) RETURN { count: count(this) }" `); @@ -93,7 +93,7 @@ describe("Plural directive", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`Tech\`) + CREATE (create_this1:Tech) SET create_this1.name = create_var0.name RETURN create_this1 @@ -127,7 +127,7 @@ describe("Plural directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Tech\`) + "MATCH (this:Tech) SET this.name = $this_update_name RETURN collect(DISTINCT this { .name }) AS data" `); @@ -152,7 +152,7 @@ describe("Plural directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Tech\`) + "MATCH (this:Tech) WHERE this.name = $param0 DETACH DELETE this" `); @@ -176,7 +176,7 @@ describe("Plural directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Tech\`) + "MATCH (this:Tech) RETURN this { .name } AS this" `); diff --git a/packages/graphql/tests/tck/directives/relationship.test.ts b/packages/graphql/tests/tck/directives/relationship.test.ts index 1f892fc8ab..e646c87a2f 100644 --- a/packages/graphql/tests/tck/directives/relationship.test.ts +++ b/packages/graphql/tests/tck/directives/relationship.test.ts @@ -67,10 +67,10 @@ describe("Cypher relationship", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[this0:\`TOP_ACTOR\`]->(this1:\`Actor\`) + MATCH (this)-[this0:TOP_ACTOR]->(this1:Actor) WITH this1 { .name } AS this1 RETURN head(collect(this1)) AS var2 } @@ -95,10 +95,10 @@ describe("Cypher relationship", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WITH this1 { .name } AS this1 RETURN collect(this1) AS var2 } @@ -126,13 +126,13 @@ describe("Cypher relationship", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[this0:\`TOP_ACTOR\`]->(this1:\`Actor\`) + MATCH (this)-[this0:TOP_ACTOR]->(this1:Actor) CALL { WITH this1 - MATCH (this1)-[this2:\`ACTED_IN\`]->(this3:\`Movie\`) + MATCH (this1)-[this2:ACTED_IN]->(this3:Movie) WITH this3 { .title } AS this3 RETURN collect(this3) AS var4 } @@ -163,15 +163,15 @@ describe("Cypher relationship", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this - MATCH (this)-[this0:\`TOP_ACTOR\`]->(this1:\`Actor\`) + MATCH (this)-[this0:TOP_ACTOR]->(this1:Actor) WHERE this1.name = $param1 CALL { WITH this1 - MATCH (this1)-[this2:\`ACTED_IN\`]->(this3:\`Movie\`) + MATCH (this1)-[this2:ACTED_IN]->(this3:Movie) WHERE this3.title = $param2 WITH this3 { .title } AS this3 RETURN collect(this3) AS var4 diff --git a/packages/graphql/tests/tck/directives/timestamp/datetime.test.ts b/packages/graphql/tests/tck/directives/timestamp/datetime.test.ts index 2bec0f1219..df241c182a 100644 --- a/packages/graphql/tests/tck/directives/timestamp/datetime.test.ts +++ b/packages/graphql/tests/tck/directives/timestamp/datetime.test.ts @@ -65,7 +65,7 @@ describe("Cypher TimeStamps On DateTime Fields", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`Movie\`) + CREATE (create_this1:Movie) SET create_this1.id = create_var0.id, create_this1.createdAt = datetime(), @@ -102,7 +102,7 @@ describe("Cypher TimeStamps On DateTime Fields", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) SET this.updatedAt = datetime() SET this.interfaceTimestamp = datetime() SET this.id = $this_update_id diff --git a/packages/graphql/tests/tck/directives/timestamp/time.test.ts b/packages/graphql/tests/tck/directives/timestamp/time.test.ts index 4871f9a435..b63e8575b8 100644 --- a/packages/graphql/tests/tck/directives/timestamp/time.test.ts +++ b/packages/graphql/tests/tck/directives/timestamp/time.test.ts @@ -65,7 +65,7 @@ describe("Cypher TimeStamps On Time Fields", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`Movie\`) + CREATE (create_this1:Movie) SET create_this1.id = create_var0.id, create_this1.createdAt = time(), @@ -102,7 +102,7 @@ describe("Cypher TimeStamps On Time Fields", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) SET this.updatedAt = time() SET this.interfaceTimestamp = time() SET this.id = $this_update_id diff --git a/packages/graphql/tests/tck/fragments.test.ts b/packages/graphql/tests/tck/fragments.test.ts index 47d1b11da9..e911f50e79 100644 --- a/packages/graphql/tests/tck/fragments.test.ts +++ b/packages/graphql/tests/tck/fragments.test.ts @@ -78,7 +78,7 @@ describe("Cypher Fragment", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) RETURN this { .id, .username } AS this" `); @@ -103,17 +103,17 @@ describe("Cypher Fragment", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) CALL { WITH this CALL { WITH * - MATCH (this)-[this0:\`OWNS\`]->(this1:\`Tile\`) + MATCH (this)-[this0:OWNS]->(this1:Tile) WITH this1 { __resolveType: \\"Tile\\", __id: id(this), .id } AS this1 RETURN this1 AS var2 UNION WITH * - MATCH (this)-[this3:\`OWNS\`]->(this4:\`Character\`) + MATCH (this)-[this3:OWNS]->(this4:Character) WITH this4 { __resolveType: \\"Character\\", __id: id(this), .id } AS this4 RETURN this4 AS var2 } @@ -143,7 +143,7 @@ describe("Cypher Fragment", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) RETURN this { .id, .username } AS this" `); diff --git a/packages/graphql/tests/tck/fulltext/auth.test.ts b/packages/graphql/tests/tck/fulltext/auth.test.ts index fee508bf78..16af2bd177 100644 --- a/packages/graphql/tests/tck/fulltext/auth.test.ts +++ b/packages/graphql/tests/tck/fulltext/auth.test.ts @@ -77,7 +77,7 @@ describe("Cypher -> fulltext -> Auth", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this WITH * - WHERE ($param1 IN labels(this) AND ($isAuthenticated = true AND size([(this)<-[:\`DIRECTED\`]-(this0:\`Person\`) WHERE this0.id = coalesce($jwt.sub, $jwtDefault) | 1]) > 0)) + WHERE ($param1 IN labels(this) AND ($isAuthenticated = true AND size([(this)<-[:DIRECTED]-(this0:Person) WHERE this0.id = coalesce($jwt.sub, $jwtDefault) | 1]) > 0)) RETURN this { .title } AS this" `); @@ -133,7 +133,7 @@ describe("Cypher -> fulltext -> Auth", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this WITH * - WHERE ($param1 IN labels(this) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this)<-[:\`DIRECTED\`]-(this0:\`Person\`) WHERE this0.id = coalesce($jwt.sub, $jwtDefault) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE ($param1 IN labels(this) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this)<-[:DIRECTED]-(this0:Person) WHERE this0.id = coalesce($jwt.sub, $jwtDefault) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN this { .title } AS this" `); @@ -191,7 +191,7 @@ describe("Cypher -> fulltext -> Auth", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this WITH * - WHERE ($param1 IN labels(this) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this)<-[:\`DIRECTED\`]-(this0:\`Person\`) WHERE NOT (this0.id = coalesce($jwt.sub, $jwtDefault)) | 1]) = 0), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE ($param1 IN labels(this) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this)<-[:DIRECTED]-(this0:Person) WHERE NOT (this0.id = coalesce($jwt.sub, $jwtDefault)) | 1]) = 0), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN this { .title } AS this" `); @@ -251,7 +251,7 @@ describe("Cypher -> fulltext -> Auth", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this WITH * - WHERE ($param1 IN labels(this) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this)<-[this1:\`DIRECTED\`]-(this0:\`Person\`) WHERE this0.id = coalesce($jwt.sub, $jwtDefault) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE ($param1 IN labels(this) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this)<-[this1:DIRECTED]-(this0:Person) WHERE this0.id = coalesce($jwt.sub, $jwtDefault) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN this { .title } AS this" `); @@ -314,7 +314,7 @@ describe("Cypher -> fulltext -> Auth", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this WITH * - WHERE ($param1 IN labels(this) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this)<-[this1:\`DIRECTED\`]-(this0:\`Person\`) WHERE NOT (this0.id = coalesce($jwt.sub, $jwtDefault)) | 1]) = 0), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE ($param1 IN labels(this) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this)<-[this1:DIRECTED]-(this0:Person) WHERE NOT (this0.id = coalesce($jwt.sub, $jwtDefault)) | 1]) = 0), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN this { .title } AS this" `); @@ -378,7 +378,7 @@ describe("Cypher -> fulltext -> Auth", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this WITH * - WHERE ($param1 IN labels(this) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this)<-[this0:\`DIRECTED\`]-(this1:\`Person\`) WHERE this0.year = $param3 | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE ($param1 IN labels(this) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this)<-[this0:DIRECTED]-(this1:Person) WHERE this0.year = $param3 | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN this { .title } AS this" `); @@ -438,7 +438,7 @@ describe("Cypher -> fulltext -> Auth", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this WITH * - WHERE ($param1 IN labels(this) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this)<-[this0:\`DIRECTED\`]-(this1:\`Person\`) WHERE NOT (this0.year = $param3) | 1]) = 0), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE ($param1 IN labels(this) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this)<-[this0:DIRECTED]-(this1:Person) WHERE NOT (this0.year = $param3) | 1]) = 0), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN this { .title } AS this" `); @@ -493,7 +493,7 @@ describe("Cypher -> fulltext -> Auth", () => { "CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this WITH * WHERE ($param1 IN labels(this) AND ($isAuthenticated = true AND EXISTS { - MATCH (this)<-[:\`DIRECTED\`]-(this0:\`Person\`) + MATCH (this)<-[:DIRECTED]-(this0:Person) WHERE this0.id = coalesce($jwt.sub, $jwtDefault) })) RETURN this { .title } AS this" @@ -552,7 +552,7 @@ describe("Cypher -> fulltext -> Auth", () => { "CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this WITH * WHERE ($param1 IN labels(this) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { - MATCH (this)<-[:\`DIRECTED\`]-(this0:\`Person\`) + MATCH (this)<-[:DIRECTED]-(this0:Person) WHERE this0.id = coalesce($jwt.sub, $jwtDefault) }), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN this { .title } AS this" @@ -613,10 +613,10 @@ describe("Cypher -> fulltext -> Auth", () => { "CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this WITH * WHERE ($param1 IN labels(this) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (EXISTS { - MATCH (this)<-[:\`DIRECTED\`]-(this0:\`Person\`) + MATCH (this)<-[:DIRECTED]-(this0:Person) WHERE this0.id = coalesce($jwt.sub, $jwtDefault) } AND NOT (EXISTS { - MATCH (this)<-[:\`DIRECTED\`]-(this0:\`Person\`) + MATCH (this)<-[:DIRECTED]-(this0:Person) WHERE NOT (this0.id = coalesce($jwt.sub, $jwtDefault)) }))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN this { .title } AS this" @@ -679,7 +679,7 @@ describe("Cypher -> fulltext -> Auth", () => { "CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this WITH * WHERE ($param1 IN labels(this) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { - MATCH (this)<-[this0:\`DIRECTED\`]-(this1:\`Person\`) + MATCH (this)<-[this0:DIRECTED]-(this1:Person) WHERE this1.id = coalesce($jwt.sub, $jwtDefault) }), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN this { .title } AS this" @@ -745,10 +745,10 @@ describe("Cypher -> fulltext -> Auth", () => { "CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this WITH * WHERE ($param1 IN labels(this) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (EXISTS { - MATCH (this)<-[this0:\`DIRECTED\`]-(this1:\`Person\`) + MATCH (this)<-[this0:DIRECTED]-(this1:Person) WHERE this1.id = coalesce($jwt.sub, $jwtDefault) } AND NOT (EXISTS { - MATCH (this)<-[this0:\`DIRECTED\`]-(this1:\`Person\`) + MATCH (this)<-[this0:DIRECTED]-(this1:Person) WHERE NOT (this1.id = coalesce($jwt.sub, $jwtDefault)) }))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN this { .title } AS this" @@ -815,7 +815,7 @@ describe("Cypher -> fulltext -> Auth", () => { "CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this WITH * WHERE ($param1 IN labels(this) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { - MATCH (this)<-[this0:\`DIRECTED\`]-(this1:\`Person\`) + MATCH (this)<-[this0:DIRECTED]-(this1:Person) WHERE this0.year = $param3 }), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN this { .title } AS this" @@ -878,10 +878,10 @@ describe("Cypher -> fulltext -> Auth", () => { "CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this WITH * WHERE ($param1 IN labels(this) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (EXISTS { - MATCH (this)<-[this0:\`DIRECTED\`]-(this1:\`Person\`) + MATCH (this)<-[this0:DIRECTED]-(this1:Person) WHERE this0.year = $param3 } AND NOT (EXISTS { - MATCH (this)<-[this0:\`DIRECTED\`]-(this1:\`Person\`) + MATCH (this)<-[this0:DIRECTED]-(this1:Person) WHERE NOT (this0.year = $param3) }))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN this { .title } AS this" diff --git a/packages/graphql/tests/tck/global-node.test.ts b/packages/graphql/tests/tck/global-node.test.ts index 9cc635a716..fcc41bf089 100644 --- a/packages/graphql/tests/tck/global-node.test.ts +++ b/packages/graphql/tests/tck/global-node.test.ts @@ -59,7 +59,7 @@ describe("Global nodes", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 RETURN this { .title } AS this" `); @@ -97,7 +97,7 @@ describe("Global nodes", () => { variableValues: { id: toGlobalId({ typeName: "Actor", field: "dbId", id: "123455" }) }, }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WHERE this.id = $param0 RETURN this { .name, dbId: this.id } AS this" `); @@ -142,7 +142,7 @@ describe("Global nodes", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WHERE this.id = $param0 RETURN this { .name } AS this" `); @@ -185,7 +185,7 @@ describe("Global nodes", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WHERE this.dbId = $param0 RETURN this { .dbId, .name } AS this" `); diff --git a/packages/graphql/tests/tck/issues/1115.test.ts b/packages/graphql/tests/tck/issues/1115.test.ts index a7ee3a0c61..17016e2f78 100644 --- a/packages/graphql/tests/tck/issues/1115.test.ts +++ b/packages/graphql/tests/tck/issues/1115.test.ts @@ -82,14 +82,14 @@ describe("https://github.com/neo4j/graphql/issues/1115", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Parent\`) + "MATCH (this:Parent) WITH this CALL { WITH this - MERGE (this_connectOrCreate_children0:\`Child\` { tcId: $this_connectOrCreate_children_param0 }) + MERGE (this_connectOrCreate_children0:Child { tcId: $this_connectOrCreate_children_param0 }) ON CREATE SET this_connectOrCreate_children0.tcId = $this_connectOrCreate_children_param1 - MERGE (this)<-[this_connectOrCreate_children_this0:\`HAS\`]-(this_connectOrCreate_children0) + MERGE (this)<-[this_connectOrCreate_children_this0:HAS]-(this_connectOrCreate_children0) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $this_connectOrCreate_children_param3 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN count(*) AS _ @@ -97,10 +97,10 @@ describe("https://github.com/neo4j/graphql/issues/1115", () => { WITH this CALL { WITH this - MERGE (this_connectOrCreate_children1:\`Child\` { tcId: $this_connectOrCreate_children_param5 }) + MERGE (this_connectOrCreate_children1:Child { tcId: $this_connectOrCreate_children_param5 }) ON CREATE SET this_connectOrCreate_children1.tcId = $this_connectOrCreate_children_param6 - MERGE (this)<-[this_connectOrCreate_children_this1:\`HAS\`]-(this_connectOrCreate_children1) + MERGE (this)<-[this_connectOrCreate_children_this1:HAS]-(this_connectOrCreate_children1) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $this_connectOrCreate_children_param7 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN count(*) AS _ diff --git a/packages/graphql/tests/tck/issues/1131.test.ts b/packages/graphql/tests/tck/issues/1131.test.ts index 7131f6d94b..e2fbe88431 100644 --- a/packages/graphql/tests/tck/issues/1131.test.ts +++ b/packages/graphql/tests/tck/issues/1131.test.ts @@ -83,33 +83,33 @@ describe("https://github.com/neo4j/graphql/issues/1131", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`BibliographicReference\`:\`Resource\`) + "MATCH (this:BibliographicReference:Resource) WHERE this.uri = $param0 SET this.prefLabel = $this_update_prefLabel WITH this CALL { WITH this - MERGE (this_isInPublication0_connectOrCreate0:\`Concept\`:\`Resource\` { uri: $this_isInPublication0_connectOrCreate_param0 }) + MERGE (this_isInPublication0_connectOrCreate0:Concept:Resource { uri: $this_isInPublication0_connectOrCreate_param0 }) ON CREATE SET this_isInPublication0_connectOrCreate0.uri = $this_isInPublication0_connectOrCreate_param1, this_isInPublication0_connectOrCreate0.prefLabel = $this_isInPublication0_connectOrCreate_param2 - MERGE (this)-[this_isInPublication0_connectOrCreate_this0:\`isInPublication\`]->(this_isInPublication0_connectOrCreate0) + MERGE (this)-[this_isInPublication0_connectOrCreate_this0:isInPublication]->(this_isInPublication0_connectOrCreate0) RETURN count(*) AS _ } WITH this CALL { WITH this - MERGE (this_isInPublication1_connectOrCreate0:\`Concept\`:\`Resource\` { uri: $this_isInPublication1_connectOrCreate_param0 }) + MERGE (this_isInPublication1_connectOrCreate0:Concept:Resource { uri: $this_isInPublication1_connectOrCreate_param0 }) ON CREATE SET this_isInPublication1_connectOrCreate0.uri = $this_isInPublication1_connectOrCreate_param1, this_isInPublication1_connectOrCreate0.prefLabel = $this_isInPublication1_connectOrCreate_param2 - MERGE (this)-[this_isInPublication1_connectOrCreate_this0:\`isInPublication\`]->(this_isInPublication1_connectOrCreate0) + MERGE (this)-[this_isInPublication1_connectOrCreate_this0:isInPublication]->(this_isInPublication1_connectOrCreate0) RETURN count(*) AS _ } WITH * CALL { WITH this - MATCH (this)-[update_this0:\`isInPublication\`]->(update_this1:\`Concept\`:\`Resource\`) + MATCH (this)-[update_this0:isInPublication]->(update_this1:Concept:Resource) WHERE update_this1.uri IN $update_param0 WITH update_this1 { iri: update_this1.uri, .prefLabel } AS update_this1 RETURN collect(update_this1) AS update_var2 diff --git a/packages/graphql/tests/tck/issues/1132.test.ts b/packages/graphql/tests/tck/issues/1132.test.ts index 4991ad3a91..33d4e0fed9 100644 --- a/packages/graphql/tests/tck/issues/1132.test.ts +++ b/packages/graphql/tests/tck/issues/1132.test.ts @@ -61,7 +61,7 @@ describe("https://github.com/neo4j/graphql/issues/1132", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Source\`) + "MATCH (this:Source) WITH this CALL { WITH this @@ -74,7 +74,7 @@ describe("https://github.com/neo4j/graphql/issues/1132", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_targets0_node - MERGE (this)-[:\`HAS_TARGET\`]->(this_connect_targets0_node) + MERGE (this)-[:HAS_TARGET]->(this_connect_targets0_node) } } WITH this, this_connect_targets0_node @@ -136,11 +136,11 @@ describe("https://github.com/neo4j/graphql/issues/1132", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Source\`) + "MATCH (this:Source) WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_disconnect_targets0_rel:\`HAS_TARGET\`]->(this_disconnect_targets0:Target) + OPTIONAL MATCH (this)-[this_disconnect_targets0_rel:HAS_TARGET]->(this_disconnect_targets0:Target) WHERE this_disconnect_targets0.id = $updateSources_args_disconnect_targets0_where_Target_this_disconnect_targets0param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { WITH this_disconnect_targets0, this_disconnect_targets0_rel, this diff --git a/packages/graphql/tests/tck/issues/1150.test.ts b/packages/graphql/tests/tck/issues/1150.test.ts index 5871d67dfb..2226a2821b 100644 --- a/packages/graphql/tests/tck/issues/1150.test.ts +++ b/packages/graphql/tests/tck/issues/1150.test.ts @@ -107,23 +107,23 @@ describe("https://github.com/neo4j/graphql/issues/1150", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Drive\`) + "MATCH (this:Drive) WHERE this.current = $param0 CALL { WITH this - MATCH (this)-[this0:\`CONSISTS_OF\`]->(this1:\`DriveComposition\`) + MATCH (this)-[this0:CONSISTS_OF]->(this1:DriveComposition) WHERE this0.current = $param1 CALL { WITH this1 CALL { WITH this1 - MATCH (this1:\`DriveComposition\`)-[this2:\`HAS\`]->(this3:\`Battery\`) + MATCH (this1:DriveComposition)-[this2:HAS]->(this3:Battery) WHERE (this2.current = $param2 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $param4 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH { current: this2.current, node: { __resolveType: \\"Battery\\", __id: id(this3), id: this3.id } } AS edge RETURN edge UNION WITH this1 - MATCH (this1:\`DriveComposition\`)-[this4:\`HAS\`]->(this5:\`CombustionEngine\`) + MATCH (this1:DriveComposition)-[this4:HAS]->(this5:CombustionEngine) WHERE this4.current = $param6 WITH { current: this4.current, node: { __resolveType: \\"CombustionEngine\\", __id: id(this5), id: this5.id } } AS edge RETURN edge diff --git a/packages/graphql/tests/tck/issues/1182.test.ts b/packages/graphql/tests/tck/issues/1182.test.ts index 15ca306b74..69035f6be5 100644 --- a/packages/graphql/tests/tck/issues/1182.test.ts +++ b/packages/graphql/tests/tck/issues/1182.test.ts @@ -86,17 +86,17 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { WITH this0 CALL { WITH this0 - MERGE (this0_actors_connectOrCreate0:\`Actor\` { id: $this0_actors_connectOrCreate_param0 }) + MERGE (this0_actors_connectOrCreate0:Actor { id: $this0_actors_connectOrCreate_param0 }) ON CREATE SET this0_actors_connectOrCreate0.name = $this0_actors_connectOrCreate_param1, this0_actors_connectOrCreate0.homeAddress = $this0_actors_connectOrCreate_param2, this0_actors_connectOrCreate0.dob = $this0_actors_connectOrCreate_param3 - MERGE (this0)<-[this0_actors_connectOrCreate_this0:\`ACTED_IN\`]-(this0_actors_connectOrCreate0) + MERGE (this0)<-[this0_actors_connectOrCreate_this0:ACTED_IN]-(this0_actors_connectOrCreate0) RETURN count(*) AS _ } RETURN this0 } - RETURN [ this0 { .title } ] AS data" + RETURN [this0 { .title }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` diff --git a/packages/graphql/tests/tck/issues/1221.test.ts b/packages/graphql/tests/tck/issues/1221.test.ts index cbc9c82348..1370a4fd0b 100644 --- a/packages/graphql/tests/tck/issues/1221.test.ts +++ b/packages/graphql/tests/tck/issues/1221.test.ts @@ -85,15 +85,15 @@ describe("https://github.com/neo4j/graphql/issues/1221", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Series\`) - WHERE (this.current = $param0 AND single(this1 IN [(this)-[this3:\`ARCHITECTURE\`]->(this1:\`MasterData\`) WHERE single(this0 IN [(this1)-[this2:\`HAS_NAME\`]->(this0:\`NameDetails\`) WHERE this0.fullName = $param1 | 1] WHERE true) | 1] WHERE true)) + "MATCH (this:Series) + WHERE (this.current = $param0 AND single(this1 IN [(this)-[this3:ARCHITECTURE]->(this1:MasterData) WHERE single(this0 IN [(this1)-[this2:HAS_NAME]->(this0:NameDetails) WHERE this0.fullName = $param1 | 1] WHERE true) | 1] WHERE true)) CALL { WITH this - MATCH (this)-[this4:\`ARCHITECTURE\`]->(this5:\`MasterData\`) + MATCH (this)-[this4:ARCHITECTURE]->(this5:MasterData) WHERE this4.current = $param2 CALL { WITH this5 - MATCH (this5:\`MasterData\`)-[this6:\`HAS_NAME\`]->(this7:\`NameDetails\`) + MATCH (this5:MasterData)-[this6:HAS_NAME]->(this7:NameDetails) WHERE this6.current = $param3 WITH { node: { fullName: this7.fullName } } AS edge WITH collect(edge) AS edges @@ -193,22 +193,22 @@ describe("https://github.com/neo4j/graphql/issues/1221", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Main\`) - WHERE (this.current = $param0 AND single(this0 IN [(this)-[this5:\`MAIN\`]->(this0:\`Series\`) WHERE EXISTS { - MATCH (this0)-[this1:\`ARCHITECTURE\`]->(this2:\`MasterData\`) - WHERE single(this3 IN [(this2)-[this4:\`HAS_NAME\`]->(this3:\`NameDetails\`) WHERE this3.fullName = $param1 | 1] WHERE true) + "MATCH (this:Main) + WHERE (this.current = $param0 AND single(this0 IN [(this)-[this5:MAIN]->(this0:Series) WHERE EXISTS { + MATCH (this0)-[this1:ARCHITECTURE]->(this2:MasterData) + WHERE single(this3 IN [(this2)-[this4:HAS_NAME]->(this3:NameDetails) WHERE this3.fullName = $param1 | 1] WHERE true) } | 1] WHERE true)) CALL { WITH this - MATCH (this)-[this6:\`MAIN\`]->(this7:\`Series\`) + MATCH (this)-[this6:MAIN]->(this7:Series) WHERE this6.current = $param2 CALL { WITH this7 - MATCH (this7:\`Series\`)-[this8:\`ARCHITECTURE\`]->(this9:\`MasterData\`) + MATCH (this7:Series)-[this8:ARCHITECTURE]->(this9:MasterData) WHERE this8.current = $param3 CALL { WITH this9 - MATCH (this9:\`MasterData\`)-[this10:\`HAS_NAME\`]->(this11:\`NameDetails\`) + MATCH (this9:MasterData)-[this10:HAS_NAME]->(this11:NameDetails) WHERE this10.current = $param4 WITH { node: { fullName: this11.fullName } } AS edge WITH collect(edge) AS edges diff --git a/packages/graphql/tests/tck/issues/1249.test.ts b/packages/graphql/tests/tck/issues/1249.test.ts index a127dc9240..912270d6a0 100644 --- a/packages/graphql/tests/tck/issues/1249.test.ts +++ b/packages/graphql/tests/tck/issues/1249.test.ts @@ -83,13 +83,13 @@ describe("https://github.com/neo4j/graphql/issues/1249", () => { const result = await translateQuery(neoSchema, query, { contextValues: { cypherParams: { tenant: "BULK" } } }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Bulk\`:\`BULK\`) + "MATCH (this:Bulk:BULK) CALL { WITH this - MATCH (this)-[this0:\`MATERIAL_BULK\`]->(this1:\`Material\`) + MATCH (this)-[this0:MATERIAL_BULK]->(this1:Material) CALL { WITH this1 - MATCH (this1:\`Material\`)-[this2:\`MATERIAL_SUPPLIER\`]->(this3:\`Supplier\`) + MATCH (this1:Material)-[this2:MATERIAL_SUPPLIER]->(this3:Supplier) WITH { supplierMaterialNumber: this2.supplierMaterialNumber, node: { supplierId: this3.supplierId } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount diff --git a/packages/graphql/tests/tck/issues/1263.test.ts b/packages/graphql/tests/tck/issues/1263.test.ts index c1e6d1c81f..f52742696e 100644 --- a/packages/graphql/tests/tck/issues/1263.test.ts +++ b/packages/graphql/tests/tck/issues/1263.test.ts @@ -79,18 +79,18 @@ describe("https://github.com/neo4j/graphql/issues/1263", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this CALL { WITH this - MATCH (this)-[this0:\`ACTED_IN\`]->(this1:\`Movie\`) + MATCH (this)-[this0:ACTED_IN]->(this1:Movie) WHERE (this1.title = $param0 AND this1.runtime > $param1) WITH { node: { __resolveType: \\"Movie\\", __id: id(this1), title: this1.title } } AS edge RETURN edge UNION WITH this - MATCH (this)-[this2:\`ACTED_IN\`]->(this3:\`Series\`) + MATCH (this)-[this2:ACTED_IN]->(this3:Series) WHERE (this3.title = $param2 AND this3.episodes > $param3) WITH { node: { __resolveType: \\"Series\\", __id: id(this3), title: this3.title } } AS edge RETURN edge diff --git a/packages/graphql/tests/tck/issues/1320.test.ts b/packages/graphql/tests/tck/issues/1320.test.ts index 3044423d6e..e87bb76e02 100644 --- a/packages/graphql/tests/tck/issues/1320.test.ts +++ b/packages/graphql/tests/tck/issues/1320.test.ts @@ -68,16 +68,16 @@ describe("https://github.com/neo4j/graphql/issues/1320", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Team\`) + "MATCH (this:Team) CALL { WITH this - MATCH (this)-[this0:\`OWNS_RISK\`]->(this1:\`Risk\`) + MATCH (this)-[this0:OWNS_RISK]->(this1:Risk) WHERE $param0 IN this1.mitigationState RETURN count(this1) AS var2 } CALL { WITH this - MATCH (this)-[this3:\`OWNS_RISK\`]->(this4:\`Risk\`) + MATCH (this)-[this3:OWNS_RISK]->(this4:Risk) WHERE $param1 IN this4.mitigationState RETURN count(this4) AS var5 } diff --git a/packages/graphql/tests/tck/issues/1348.test.ts b/packages/graphql/tests/tck/issues/1348.test.ts index 2ec07b886b..b037cfd0ef 100644 --- a/packages/graphql/tests/tck/issues/1348.test.ts +++ b/packages/graphql/tests/tck/issues/1348.test.ts @@ -81,22 +81,22 @@ describe("https://github.com/neo4j/graphql/issues/1348", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`ProgrammeItem\`) + "MATCH (this:ProgrammeItem) CALL { WITH this CALL { WITH * - MATCH (this)-[this0:\`RELATES_TO\`]-(this1:\`Series\`) + MATCH (this)-[this0:RELATES_TO]-(this1:Series) WITH this1 { __resolveType: \\"Series\\", __id: id(this), .productTitle } AS this1 RETURN this1 AS var2 UNION WITH * - MATCH (this)-[this3:\`RELATES_TO\`]-(this4:\`Season\`) + MATCH (this)-[this3:RELATES_TO]-(this4:Season) WITH this4 { __resolveType: \\"Season\\", __id: id(this), .productTitle } AS this4 RETURN this4 AS var2 UNION WITH * - MATCH (this)-[this5:\`RELATES_TO\`]-(this6:\`ProgrammeItem\`) + MATCH (this)-[this5:RELATES_TO]-(this6:ProgrammeItem) WITH this6 { __resolveType: \\"ProgrammeItem\\", __id: id(this), .productTitle } AS this6 RETURN this6 AS var2 } @@ -137,22 +137,22 @@ describe("https://github.com/neo4j/graphql/issues/1348", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`ProgrammeItem\`) + "MATCH (this:ProgrammeItem) CALL { WITH this CALL { WITH this - MATCH (this)-[this0:\`RELATES_TO\`]-(this1:\`Series\`) + MATCH (this)-[this0:RELATES_TO]-(this1:Series) WITH { node: { __resolveType: \\"Series\\", __id: id(this1), productTitle: this1.productTitle } } AS edge RETURN edge UNION WITH this - MATCH (this)-[this2:\`RELATES_TO\`]-(this3:\`Season\`) + MATCH (this)-[this2:RELATES_TO]-(this3:Season) WITH { node: { __resolveType: \\"Season\\", __id: id(this3), productTitle: this3.productTitle } } AS edge RETURN edge UNION WITH this - MATCH (this)-[this4:\`RELATES_TO\`]-(this5:\`ProgrammeItem\`) + MATCH (this)-[this4:RELATES_TO]-(this5:ProgrammeItem) WITH { node: { __resolveType: \\"ProgrammeItem\\", __id: id(this5), productTitle: this5.productTitle } } AS edge RETURN edge } diff --git a/packages/graphql/tests/tck/issues/1364.test.ts b/packages/graphql/tests/tck/issues/1364.test.ts index ef401e5f78..125a4c5dee 100644 --- a/packages/graphql/tests/tck/issues/1364.test.ts +++ b/packages/graphql/tests/tck/issues/1364.test.ts @@ -93,7 +93,7 @@ describe("https://github.com/neo4j/graphql/issues/1364", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WITH collect(this) AS edges WITH edges, size(edges) AS totalCount UNWIND edges AS this @@ -134,7 +134,7 @@ describe("https://github.com/neo4j/graphql/issues/1364", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WITH collect(this) AS edges WITH edges, size(edges) AS totalCount UNWIND edges AS this @@ -176,7 +176,7 @@ describe("https://github.com/neo4j/graphql/issues/1364", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WITH collect(this) AS edges WITH edges, size(edges) AS totalCount UNWIND edges AS this diff --git a/packages/graphql/tests/tck/issues/1430.test.ts b/packages/graphql/tests/tck/issues/1430.test.ts index 6ba34a3151..3f64e1e304 100644 --- a/packages/graphql/tests/tck/issues/1430.test.ts +++ b/packages/graphql/tests/tck/issues/1430.test.ts @@ -79,25 +79,25 @@ describe("https://github.com/neo4j/graphql/issues/1430", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`ABCE\`) + "MATCH (this:ABCE) WHERE this.id = $param0 - CALL apoc.util.validate(EXISTS((this)-[:\`HAS_INTERFACE\`]->(:ChildOne)),'Relationship field \\"%s.%s\\" cannot have more than one node linked',[\\"ABCE\\",\\"interface\\"]) - CALL apoc.util.validate(EXISTS((this)-[:\`HAS_INTERFACE\`]->(:ChildTwo)),'Relationship field \\"%s.%s\\" cannot have more than one node linked',[\\"ABCE\\",\\"interface\\"]) + CALL apoc.util.validate(EXISTS((this)-[:HAS_INTERFACE]->(:ChildOne)),'Relationship field \\"%s.%s\\" cannot have more than one node linked',[\\"ABCE\\",\\"interface\\"]) + CALL apoc.util.validate(EXISTS((this)-[:HAS_INTERFACE]->(:ChildTwo)),'Relationship field \\"%s.%s\\" cannot have more than one node linked',[\\"ABCE\\",\\"interface\\"]) CREATE (this_create_interface_ChildOne0_node_ChildOne:ChildOne) SET this_create_interface_ChildOne0_node_ChildOne.id = randomUUID() SET this_create_interface_ChildOne0_node_ChildOne.name = $this_create_interface_ChildOne0_node_ChildOne_name - MERGE (this)-[:\`HAS_INTERFACE\`]->(this_create_interface_ChildOne0_node_ChildOne) + MERGE (this)-[:HAS_INTERFACE]->(this_create_interface_ChildOne0_node_ChildOne) WITH * CALL { WITH this CALL { WITH * - MATCH (this)-[update_this0:\`HAS_INTERFACE\`]->(update_this1:\`ChildOne\`) + MATCH (this)-[update_this0:HAS_INTERFACE]->(update_this1:ChildOne) WITH update_this1 { __resolveType: \\"ChildOne\\", __id: id(this), .id, .name } AS update_this1 RETURN update_this1 AS update_var2 UNION WITH * - MATCH (this)-[update_this3:\`HAS_INTERFACE\`]->(update_this4:\`ChildTwo\`) + MATCH (this)-[update_this3:HAS_INTERFACE]->(update_this4:ChildTwo) WITH update_this4 { __resolveType: \\"ChildTwo\\", __id: id(this), .id, .name } AS update_this4 RETURN update_this4 AS update_var2 } @@ -138,10 +138,10 @@ describe("https://github.com/neo4j/graphql/issues/1430", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`ABCE\`) + "MATCH (this:ABCE) WHERE this.id = $param0 - CALL apoc.util.validate(EXISTS((this)-[:\`HAS_INTERFACE\`]->(:ChildOne)),'Relationship field \\"%s.%s\\" cannot have more than one node linked',[\\"ABCE\\",\\"interface\\"]) - CALL apoc.util.validate(EXISTS((this)-[:\`HAS_INTERFACE\`]->(:ChildTwo)),'Relationship field \\"%s.%s\\" cannot have more than one node linked',[\\"ABCE\\",\\"interface\\"]) + CALL apoc.util.validate(EXISTS((this)-[:HAS_INTERFACE]->(:ChildOne)),'Relationship field \\"%s.%s\\" cannot have more than one node linked',[\\"ABCE\\",\\"interface\\"]) + CALL apoc.util.validate(EXISTS((this)-[:HAS_INTERFACE]->(:ChildTwo)),'Relationship field \\"%s.%s\\" cannot have more than one node linked',[\\"ABCE\\",\\"interface\\"]) WITH this CALL { WITH this @@ -154,7 +154,7 @@ describe("https://github.com/neo4j/graphql/issues/1430", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_interface0_node - MERGE (this)-[:\`HAS_INTERFACE\`]->(this_connect_interface0_node) + MERGE (this)-[:HAS_INTERFACE]->(this_connect_interface0_node) } } WITH this, this_connect_interface0_node @@ -171,7 +171,7 @@ describe("https://github.com/neo4j/graphql/issues/1430", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_interface1_node - MERGE (this)-[:\`HAS_INTERFACE\`]->(this_connect_interface1_node) + MERGE (this)-[:HAS_INTERFACE]->(this_connect_interface1_node) } } WITH this, this_connect_interface1_node @@ -182,12 +182,12 @@ describe("https://github.com/neo4j/graphql/issues/1430", () => { WITH this CALL { WITH * - MATCH (this)-[update_this0:\`HAS_INTERFACE\`]->(update_this1:\`ChildOne\`) + MATCH (this)-[update_this0:HAS_INTERFACE]->(update_this1:ChildOne) WITH update_this1 { __resolveType: \\"ChildOne\\", __id: id(this), .id, .name } AS update_this1 RETURN update_this1 AS update_var2 UNION WITH * - MATCH (this)-[update_this3:\`HAS_INTERFACE\`]->(update_this4:\`ChildTwo\`) + MATCH (this)-[update_this3:HAS_INTERFACE]->(update_this4:ChildTwo) WITH update_this4 { __resolveType: \\"ChildTwo\\", __id: id(this), .id, .name } AS update_this4 RETURN update_this4 AS update_var2 } diff --git a/packages/graphql/tests/tck/issues/1528.test.ts b/packages/graphql/tests/tck/issues/1528.test.ts index 9b3c74a8a5..74019eef18 100644 --- a/packages/graphql/tests/tck/issues/1528.test.ts +++ b/packages/graphql/tests/tck/issues/1528.test.ts @@ -70,10 +70,10 @@ describe("https://github.com/neo4j/graphql/issues/1528", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Genre\`) + "MATCH (this:Genre) CALL { WITH this - MATCH (this)<-[this0:\`IS_GENRE\`]-(this1:\`Movie\`) + MATCH (this)<-[this0:IS_GENRE]-(this1:Movie) WITH this0, this1 ORDER BY this1.actorsCount DESC CALL { diff --git a/packages/graphql/tests/tck/issues/1535.test.ts b/packages/graphql/tests/tck/issues/1535.test.ts index e01300b61f..0c09bfc3c2 100644 --- a/packages/graphql/tests/tck/issues/1535.test.ts +++ b/packages/graphql/tests/tck/issues/1535.test.ts @@ -80,17 +80,17 @@ describe("https://github.com/neo4j/graphql/issues/1535", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Tenant\`) + "MATCH (this:Tenant) CALL { WITH this CALL { WITH * - MATCH (this)<-[this0:\`HOSTED_BY\`]-(this1:\`Screening\`) + MATCH (this)<-[this0:HOSTED_BY]-(this1:Screening) WITH this1 { __resolveType: \\"Screening\\", __id: id(this), .id } AS this1 RETURN this1 AS var2 UNION WITH * - MATCH (this)<-[this3:\`HOSTED_BY\`]-(this4:\`Booking\`) + MATCH (this)<-[this3:HOSTED_BY]-(this4:Booking) WITH this4 { __resolveType: \\"Booking\\", __id: id(this), .id } AS this4 RETURN this4 AS var2 } diff --git a/packages/graphql/tests/tck/issues/1536.test.ts b/packages/graphql/tests/tck/issues/1536.test.ts index d50a24aea3..5d3529c3be 100644 --- a/packages/graphql/tests/tck/issues/1536.test.ts +++ b/packages/graphql/tests/tck/issues/1536.test.ts @@ -68,15 +68,15 @@ describe("https://github.com/neo4j/graphql/issues/1536", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`SomeNode\`) + "MATCH (this:SomeNode) CALL { WITH this - MATCH (this)-[this0:\`HAS_OTHER_NODES\`]->(this1:\`OtherNode\`) + MATCH (this)-[this0:HAS_OTHER_NODES]->(this1:OtherNode) CALL { WITH this1 CALL { WITH * - MATCH (this1)-[this2:\`HAS_INTERFACE_NODES\`]->(this3:\`MyImplementation\`) + MATCH (this1)-[this2:HAS_INTERFACE_NODES]->(this3:MyImplementation) WITH this3 { __resolveType: \\"MyImplementation\\", __id: id(this1), .id } AS this3 RETURN this3 AS var4 } diff --git a/packages/graphql/tests/tck/issues/1566.test.ts b/packages/graphql/tests/tck/issues/1566.test.ts index 661d51434b..8bb51203d0 100644 --- a/packages/graphql/tests/tck/issues/1566.test.ts +++ b/packages/graphql/tests/tck/issues/1566.test.ts @@ -81,7 +81,7 @@ describe("https://github.com/neo4j/graphql/issues/1566", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Community\`) + "MATCH (this:Community) WHERE this.id = $param0 CALL { WITH this @@ -93,10 +93,10 @@ describe("https://github.com/neo4j/graphql/issues/1566", () => { } WITH pag AS this0 WITH * - WHERE (this0:\`Content\` OR this0:\`Project\`) + WHERE (this0:Content OR this0:Project) RETURN collect(CASE - WHEN this0:\`Content\` THEN this0 { __resolveType: \\"Content\\", .name } - WHEN this0:\`Project\` THEN this0 { __resolveType: \\"Project\\", .name } + WHEN this0:Content THEN this0 { __resolveType: \\"Content\\", .name } + WHEN this0:Project THEN this0 { __resolveType: \\"Project\\", .name } END) AS this0 } RETURN this { .id, hasFeedItems: this0 } AS this" diff --git a/packages/graphql/tests/tck/issues/1628.test.ts b/packages/graphql/tests/tck/issues/1628.test.ts index 09dea06ddf..25898aa616 100644 --- a/packages/graphql/tests/tck/issues/1628.test.ts +++ b/packages/graphql/tests/tck/issues/1628.test.ts @@ -63,16 +63,16 @@ describe("https://github.com/neo4j/graphql/issues/1628", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`frbr__Work\`:\`Resource\`) + "MATCH (this:frbr__Work:Resource) WHERE EXISTS { - MATCH (this)-[:\`dcterms__title\`]->(this0:\`dcterms_title\`:\`property\`) + MATCH (this)-[:dcterms__title]->(this0:dcterms_title:property) WHERE this0.value CONTAINS $param0 } WITH * LIMIT $param1 CALL { WITH this - MATCH (this)-[this1:\`dcterms__title\`]->(this2:\`dcterms_title\`:\`property\`) + MATCH (this)-[this1:dcterms__title]->(this2:dcterms_title:property) WHERE this2.value CONTAINS $param2 WITH this2 { .value } AS this2 RETURN collect(this2) AS var3 diff --git a/packages/graphql/tests/tck/issues/1685.test.ts b/packages/graphql/tests/tck/issues/1685.test.ts index b1dc9eea15..0b593a40dc 100644 --- a/packages/graphql/tests/tck/issues/1685.test.ts +++ b/packages/graphql/tests/tck/issues/1685.test.ts @@ -68,14 +68,14 @@ describe("https://github.com/neo4j/graphql/issues/1685", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Genre\`) + "MATCH (this:Genre) CALL { WITH this CALL { WITH this - MATCH (this)<-[this0:\`HAS_GENRE\`]-(this1:\`Movie\`) + MATCH (this)<-[this0:HAS_GENRE]-(this1:Movie) WHERE EXISTS { - MATCH (this1)-[this2:\`HAS_GENRE\`]->(this3:\`Genre\`) + MATCH (this1)-[this2:HAS_GENRE]->(this3:Genre) WHERE this3.name = $param0 } WITH { node: { __resolveType: \\"Movie\\", __id: id(this1) } } AS edge diff --git a/packages/graphql/tests/tck/issues/1687.test.ts b/packages/graphql/tests/tck/issues/1687.test.ts index cc0d2d581b..119d7b19b0 100644 --- a/packages/graphql/tests/tck/issues/1687.test.ts +++ b/packages/graphql/tests/tck/issues/1687.test.ts @@ -63,12 +63,12 @@ describe("https://github.com/neo4j/graphql/issues/1687", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Genre\`) + "MATCH (this:Genre) WHERE (EXISTS { - MATCH (this)<-[this0:\`HAS_GENRE\`]-(this1:\`Movie\`) + MATCH (this)<-[this0:HAS_GENRE]-(this1:Movie) WHERE this1.title = $param0 } AND NOT (EXISTS { - MATCH (this)<-[this0:\`HAS_GENRE\`]-(this1:\`Movie\`) + MATCH (this)<-[this0:HAS_GENRE]-(this1:Movie) WHERE NOT (this1.title = $param0) })) RETURN this { .name } AS this" diff --git a/packages/graphql/tests/tck/issues/1751.test.ts b/packages/graphql/tests/tck/issues/1751.test.ts index 442c83cc2c..554177fb46 100644 --- a/packages/graphql/tests/tck/issues/1751.test.ts +++ b/packages/graphql/tests/tck/issues/1751.test.ts @@ -80,20 +80,20 @@ describe("https://github.com/neo4j/graphql/issues/1751", () => { const result = await translateQuery(neoSchema, query, { variableValues }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Organization\`) + "MATCH (this:Organization) WHERE this.title = $param0 WITH * CALL { WITH * - OPTIONAL MATCH (this)-[this_admins0_relationship:\`HAS_ADMINISTRATOR\`]->(this_admins0:Admin) + OPTIONAL MATCH (this)-[this_admins0_relationship:HAS_ADMINISTRATOR]->(this_admins0:Admin) CALL { WITH this_admins0 - MATCH (this_admins0)<-[this_deleteOrganizations_args_delete_admins0_where_this_admins0this1:\`HAS_ADMINISTRATOR\`]-(this_deleteOrganizations_args_delete_admins0_where_this_admins0this2:\`Organization\`) + MATCH (this_admins0)<-[this_deleteOrganizations_args_delete_admins0_where_this_admins0this1:HAS_ADMINISTRATOR]-(this_deleteOrganizations_args_delete_admins0_where_this_admins0this2:Organization) RETURN count(this_deleteOrganizations_args_delete_admins0_where_this_admins0this2) = $this_deleteOrganizations_args_delete_admins0_where_this_admins0param0 AS this_deleteOrganizations_args_delete_admins0_where_this_admins0var0 } WITH *, CASE this_deleteOrganizations_args_delete_admins0_where_this_admins0var0 = true - WHEN true THEN [ this_admins0_relationship, this_admins0 ] - ELSE [ NULL, NULL ] + WHEN true THEN [this_admins0_relationship, this_admins0] + ELSE [NULL, NULL] END AS aggregateWhereFiltervar0 WITH *, aggregateWhereFiltervar0[0] AS this_admins0_relationship, aggregateWhereFiltervar0[1] AS this_admins0 WITH this_admins0_relationship, collect(DISTINCT this_admins0) AS this_admins0_to_delete diff --git a/packages/graphql/tests/tck/issues/1756.test.ts b/packages/graphql/tests/tck/issues/1756.test.ts index 454865b08b..ab08145d44 100644 --- a/packages/graphql/tests/tck/issues/1756.test.ts +++ b/packages/graphql/tests/tck/issues/1756.test.ts @@ -89,22 +89,22 @@ describe("https://github.com/neo4j/graphql/issues/1756", () => { WITH this0 CALL { WITH this0 - MERGE (this0_genre_connectOrCreate0:\`Genre\` { value: $this0_genre_connectOrCreate_param0 }) + MERGE (this0_genre_connectOrCreate0:Genre { value: $this0_genre_connectOrCreate_param0 }) ON CREATE SET this0_genre_connectOrCreate0.value = $this0_genre_connectOrCreate_param1, this0_genre_connectOrCreate0.id = $resolvedCallbacks.this0_genre_connectOrCreate0_id_nanoid - MERGE (this0)-[this0_genre_connectOrCreate_this0:\`HAS_GENRE\`]->(this0_genre_connectOrCreate0) + MERGE (this0)-[this0_genre_connectOrCreate_this0:HAS_GENRE]->(this0_genre_connectOrCreate0) RETURN count(*) AS _ } RETURN this0 } CALL { WITH this0 - MATCH (this0)-[create_this0:\`HAS_GENRE\`]->(create_this1:\`Genre\`) + MATCH (this0)-[create_this0:HAS_GENRE]->(create_this1:Genre) WITH create_this1 { .id, .value } AS create_this1 RETURN collect(create_this1) AS create_var2 } - RETURN [ this0 { .id, .name, genre: create_var2 } ] AS data" + RETURN [this0 { .id, .name, genre: create_var2 }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` diff --git a/packages/graphql/tests/tck/issues/1760.test.ts b/packages/graphql/tests/tck/issues/1760.test.ts index a7c8fc7682..76fa848695 100644 --- a/packages/graphql/tests/tck/issues/1760.test.ts +++ b/packages/graphql/tests/tck/issues/1760.test.ts @@ -131,7 +131,7 @@ describe("https://github.com/neo4j/graphql/issues/1760", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`ApplicationVariant\`) + "MATCH (this:ApplicationVariant) WITH * WHERE (this.current = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $param2 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0])) CALL { @@ -150,7 +150,7 @@ describe("https://github.com/neo4j/graphql/issues/1760", () => { LIMIT $param5 CALL { WITH this - MATCH (this)-[this1:\`HAS_NAME\`]->(this2:\`NameDetails\`) + MATCH (this)-[this1:HAS_NAME]->(this2:NameDetails) WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $param6 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH { node: { fullName: this2.fullName } } AS edge WITH collect(edge) AS edges @@ -159,11 +159,11 @@ describe("https://github.com/neo4j/graphql/issues/1760", () => { } CALL { WITH this - MATCH (this)-[this4:\`HAS_MARKETS\`]->(this5:\`Market\`) + MATCH (this)-[this4:HAS_MARKETS]->(this5:Market) WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $param7 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { WITH this5 - MATCH (this5:\`Market\`)-[this6:\`HAS_NAME\`]->(this7:\`NameDetails\`) + MATCH (this5:Market)-[this6:HAS_NAME]->(this7:NameDetails) WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $param8 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH { node: { fullName: this7.fullName } } AS edge WITH collect(edge) AS edges @@ -177,7 +177,7 @@ describe("https://github.com/neo4j/graphql/issues/1760", () => { } CALL { WITH this - MATCH (this)<-[this10:\`HAS_BASE\`]-(this11:\`BaseObject\`) + MATCH (this)<-[this10:HAS_BASE]-(this11:BaseObject) WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $param9 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH { node: { id: this11.id } } AS edge WITH collect(edge) AS edges diff --git a/packages/graphql/tests/tck/issues/1779.test.ts b/packages/graphql/tests/tck/issues/1779.test.ts index 9a5782427b..ba8f631389 100644 --- a/packages/graphql/tests/tck/issues/1779.test.ts +++ b/packages/graphql/tests/tck/issues/1779.test.ts @@ -60,15 +60,15 @@ describe("https://github.com/neo4j/graphql/issues/1779", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Person\`) + "MATCH (this:Person) CALL { WITH this - MATCH (this)-[this0:\`attends\`]->(this1:\`School\`) + MATCH (this)-[this0:attends]->(this1:School) WHERE (EXISTS { - MATCH (this1)<-[:\`attends\`]-(this2:\`Person\`) + MATCH (this1)<-[:attends]-(this2:Person) WHERE this2.age > $param0 } AND NOT (EXISTS { - MATCH (this1)<-[:\`attends\`]-(this2:\`Person\`) + MATCH (this1)<-[:attends]-(this2:Person) WHERE NOT (this2.age > $param0) })) WITH this1 { .name } AS this1 diff --git a/packages/graphql/tests/tck/issues/1783.test.ts b/packages/graphql/tests/tck/issues/1783.test.ts index 671360416c..0ca82482cf 100644 --- a/packages/graphql/tests/tck/issues/1783.test.ts +++ b/packages/graphql/tests/tck/issues/1783.test.ts @@ -120,11 +120,11 @@ describe("https://github.com/neo4j/graphql/issues/1783", () => { const result = await translateQuery(neoSchema, query, { variableValues }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Series\`) - WHERE (this.current = $param0 AND single(this3 IN [(this)-[this0:\`ARCHITECTURE\`]->(this3:\`MasterData\`) WHERE (this0.current = $param1 AND single(this2 IN [(this3)-[this1:\`HAS_NAME\`]->(this2:\`NameDetails\`) WHERE (this1.current = $param2 AND this2.fullName = $param3) | 1] WHERE true)) | 1] WHERE true) AND single(this5 IN [(this)-[this4:\`HAS_NAME\`]->(this5:\`NameDetails\`) WHERE (this4.current = $param4 AND this5.fullName CONTAINS $param5) | 1] WHERE true)) + "MATCH (this:Series) + WHERE (this.current = $param0 AND single(this3 IN [(this)-[this0:ARCHITECTURE]->(this3:MasterData) WHERE (this0.current = $param1 AND single(this2 IN [(this3)-[this1:HAS_NAME]->(this2:NameDetails) WHERE (this1.current = $param2 AND this2.fullName = $param3) | 1] WHERE true)) | 1] WHERE true) AND single(this5 IN [(this)-[this4:HAS_NAME]->(this5:NameDetails) WHERE (this4.current = $param4 AND this5.fullName CONTAINS $param5) | 1] WHERE true)) CALL { WITH this - MATCH (this)-[this6:\`HAS_NAME\`]->(this7:\`NameDetails\`) + MATCH (this)-[this6:HAS_NAME]->(this7:NameDetails) WHERE this6.current = $param6 WITH { node: { fullName: this7.fullName } } AS edge WITH collect(edge) AS edges @@ -133,11 +133,11 @@ describe("https://github.com/neo4j/graphql/issues/1783", () => { } CALL { WITH this - MATCH (this)-[this9:\`ARCHITECTURE\`]->(this10:\`MasterData\`) + MATCH (this)-[this9:ARCHITECTURE]->(this10:MasterData) WHERE this9.current = $param7 CALL { WITH this10 - MATCH (this10:\`MasterData\`)-[this11:\`HAS_NAME\`]->(this12:\`NameDetails\`) + MATCH (this10:MasterData)-[this11:HAS_NAME]->(this12:NameDetails) WHERE this11.current = $param8 WITH { node: { fullName: this12.fullName } } AS edge WITH collect(edge) AS edges diff --git a/packages/graphql/tests/tck/issues/1848.test.ts b/packages/graphql/tests/tck/issues/1848.test.ts index df45af55c5..2eb04ed150 100644 --- a/packages/graphql/tests/tck/issues/1848.test.ts +++ b/packages/graphql/tests/tck/issues/1848.test.ts @@ -88,7 +88,7 @@ describe("https://github.com/neo4j/graphql/issues/1848", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Community\`:\`UNIVERSAL\`) + "MATCH (this:Community:UNIVERSAL) CALL { WITH this CALL { @@ -98,10 +98,10 @@ describe("https://github.com/neo4j/graphql/issues/1848", () => { } WITH pag AS this0 WITH * - WHERE ((this0:\`ContentPiece\` AND this0:\`UNIVERSAL\`) OR (this0:\`Project\` AND this0:\`UNIVERSAL\`)) + WHERE ((this0:ContentPiece AND this0:UNIVERSAL) OR (this0:Project AND this0:UNIVERSAL)) RETURN collect(CASE - WHEN (this0:\`ContentPiece\` AND this0:\`UNIVERSAL\`) THEN this0 { __resolveType: \\"ContentPiece\\", .id } - WHEN (this0:\`Project\` AND this0:\`UNIVERSAL\`) THEN this0 { __resolveType: \\"Project\\", .id } + WHEN (this0:ContentPiece AND this0:UNIVERSAL) THEN this0 { __resolveType: \\"ContentPiece\\", .id } + WHEN (this0:Project AND this0:UNIVERSAL) THEN this0 { __resolveType: \\"Project\\", .id } END) AS this0 } RETURN this { .id, hasFeedItems: this0 } AS this" diff --git a/packages/graphql/tests/tck/issues/190.test.ts b/packages/graphql/tests/tck/issues/190.test.ts index 2125fb11ec..7809979752 100644 --- a/packages/graphql/tests/tck/issues/190.test.ts +++ b/packages/graphql/tests/tck/issues/190.test.ts @@ -63,14 +63,14 @@ describe("#190", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WHERE EXISTS { - MATCH (this)-[:\`HAS_DEMOGRAPHIC\`]->(this0:\`UserDemographics\`) + MATCH (this)-[:HAS_DEMOGRAPHIC]->(this0:UserDemographics) WHERE (this0.type = $param0 AND this0.value = $param1) } CALL { WITH this - MATCH (this)-[this1:\`HAS_DEMOGRAPHIC\`]->(this2:\`UserDemographics\`) + MATCH (this)-[this1:HAS_DEMOGRAPHIC]->(this2:UserDemographics) WITH this2 { .type, .value } AS this2 RETURN collect(this2) AS var3 } @@ -105,14 +105,14 @@ describe("#190", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WHERE EXISTS { - MATCH (this)-[:\`HAS_DEMOGRAPHIC\`]->(this0:\`UserDemographics\`) + MATCH (this)-[:HAS_DEMOGRAPHIC]->(this0:UserDemographics) WHERE ((this0.type = $param0 AND this0.value = $param1) OR this0.type = $param2 OR this0.type = $param3) } CALL { WITH this - MATCH (this)-[this1:\`HAS_DEMOGRAPHIC\`]->(this2:\`UserDemographics\`) + MATCH (this)-[this1:HAS_DEMOGRAPHIC]->(this2:UserDemographics) WITH this2 { .type, .value } AS this2 RETURN collect(this2) AS var3 } diff --git a/packages/graphql/tests/tck/issues/1933.test.ts b/packages/graphql/tests/tck/issues/1933.test.ts index f407e6d8f6..a927eafc5c 100644 --- a/packages/graphql/tests/tck/issues/1933.test.ts +++ b/packages/graphql/tests/tck/issues/1933.test.ts @@ -79,22 +79,22 @@ describe("https://github.com/neo4j/graphql/issues/1933", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Employee\`) + "MATCH (this:Employee) CALL { WITH this - MATCH (this)-[this0:\`PARTICIPATES\`]->(this1:\`Project\`) + MATCH (this)-[this0:PARTICIPATES]->(this1:Project) RETURN sum(this0.allocation) <= $param0 AS var2 } WITH * WHERE var2 = true CALL { WITH this - MATCH (this)-[this3:\`PARTICIPATES\`]->(this4:\`Project\`) + MATCH (this)-[this3:PARTICIPATES]->(this4:Project) RETURN count(this4) AS var5 } CALL { WITH this - MATCH (this)-[this3:\`PARTICIPATES\`]->(this4:\`Project\`) + MATCH (this)-[this3:PARTICIPATES]->(this4:Project) RETURN { min: min(this3.allocation), max: max(this3.allocation), average: avg(this3.allocation), sum: sum(this3.allocation) } AS var6 } RETURN this { .employeeId, .firstName, .lastName, projectsAggregate: { count: var5, edge: { allocation: var6 } } } AS this" @@ -132,22 +132,22 @@ describe("https://github.com/neo4j/graphql/issues/1933", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Employee\`) + "MATCH (this:Employee) CALL { WITH this - MATCH (this)-[this0:\`PARTICIPATES\`]->(this1:\`Project\`) + MATCH (this)-[this0:PARTICIPATES]->(this1:Project) RETURN any(var2 IN collect(this0.allocation) WHERE var2 <= $param0) AS var3 } WITH * WHERE var3 = true CALL { WITH this - MATCH (this)-[this4:\`PARTICIPATES\`]->(this5:\`Project\`) + MATCH (this)-[this4:PARTICIPATES]->(this5:Project) RETURN count(this5) AS var6 } CALL { WITH this - MATCH (this)-[this4:\`PARTICIPATES\`]->(this5:\`Project\`) + MATCH (this)-[this4:PARTICIPATES]->(this5:Project) RETURN { min: min(this4.allocation), max: max(this4.allocation), average: avg(this4.allocation), sum: sum(this4.allocation) } AS var7 } RETURN this { .employeeId, .firstName, .lastName, projectsAggregate: { count: var6, edge: { allocation: var7 } } } AS this" diff --git a/packages/graphql/tests/tck/issues/2022.test.ts b/packages/graphql/tests/tck/issues/2022.test.ts index 27f48105d4..38c4976fef 100644 --- a/packages/graphql/tests/tck/issues/2022.test.ts +++ b/packages/graphql/tests/tck/issues/2022.test.ts @@ -90,17 +90,17 @@ describe("https://github.com/neo4j/graphql/issues/2022", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`ArtPiece\`) + "MATCH (this:ArtPiece) WITH collect(this) AS edges WITH edges, size(edges) AS totalCount UNWIND edges AS this WITH this, totalCount CALL { WITH this - MATCH (this)-[this0:\`SOLD_AT_AUCTION_AS\`]->(this1:\`AuctionItem\`) + MATCH (this)-[this0:SOLD_AT_AUCTION_AS]->(this1:AuctionItem) CALL { WITH this1 - MATCH (this1)<-[this2:\`BOUGHT_ITEM_AT_AUCTION\`]-(this3:\`Organization\`) + MATCH (this1)<-[this2:BOUGHT_ITEM_AT_AUCTION]-(this3:Organization) WITH this3 { .name, dbId: this3.id } AS this3 RETURN head(collect(this3)) AS var4 } @@ -109,7 +109,7 @@ describe("https://github.com/neo4j/graphql/issues/2022", () => { } CALL { WITH this - MATCH (this)-[this6:\`OWNED_BY\`]->(this7:\`Organization\`) + MATCH (this)-[this6:OWNED_BY]->(this7:Organization) WITH this7 { .name, dbId: this7.id } AS this7 RETURN head(collect(this7)) AS var8 } diff --git a/packages/graphql/tests/tck/issues/2100.test.ts b/packages/graphql/tests/tck/issues/2100.test.ts index 20a9a9be6c..5977943e23 100644 --- a/packages/graphql/tests/tck/issues/2100.test.ts +++ b/packages/graphql/tests/tck/issues/2100.test.ts @@ -114,7 +114,7 @@ describe("https://github.com/neo4j/graphql/issues/2100", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Bacenta\`) + "MATCH (this:Bacenta) WHERE this.id = $param0 CALL { WITH this @@ -139,7 +139,7 @@ describe("https://github.com/neo4j/graphql/issues/2100", () => { } CALL { WITH this0 - MATCH (this0)-[this2:\`BUSSED_ON\`]->(this3:\`TimeGraph\`) + MATCH (this0)-[this2:BUSSED_ON]->(this3:TimeGraph) WITH this3 { .date } AS this3 RETURN head(collect(this3)) AS var4 } diff --git a/packages/graphql/tests/tck/issues/2249.test.ts b/packages/graphql/tests/tck/issues/2249.test.ts index cb8b13fa48..f00ec5f2a6 100644 --- a/packages/graphql/tests/tck/issues/2249.test.ts +++ b/packages/graphql/tests/tck/issues/2249.test.ts @@ -87,7 +87,7 @@ describe("https://github.com/neo4j/graphql/issues/2249", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 WITH this CALL { @@ -96,7 +96,7 @@ describe("https://github.com/neo4j/graphql/issues/2249", () => { CREATE (this_reviewers0_create0_node:Person) SET this_reviewers0_create0_node.name = $this_reviewers0_create0_node_name SET this_reviewers0_create0_node.reputation = $this_reviewers0_create0_node_reputation - MERGE (this)<-[this_reviewers0_create0_relationship:\`REVIEWED\`]-(this_reviewers0_create0_node) + MERGE (this)<-[this_reviewers0_create0_relationship:REVIEWED]-(this_reviewers0_create0_node) SET this_reviewers0_create0_relationship.score = $updateMovies.args.update.reviewers[0].create[0].edge.score RETURN count(*) AS update_this_Person } @@ -110,12 +110,12 @@ describe("https://github.com/neo4j/graphql/issues/2249", () => { WITH this CALL { WITH * - MATCH (this)<-[update_this0:\`REVIEWED\`]-(update_this1:\`Person\`) + MATCH (this)<-[update_this0:REVIEWED]-(update_this1:Person) WITH update_this1 { __resolveType: \\"Person\\", __id: id(this), .name, .reputation } AS update_this1 RETURN update_this1 AS update_var2 UNION WITH * - MATCH (this)<-[update_this3:\`REVIEWED\`]-(update_this4:\`Influencer\`) + MATCH (this)<-[update_this3:REVIEWED]-(update_this4:Influencer) WITH update_this4 { __resolveType: \\"Influencer\\", __id: id(this) } AS update_this4 RETURN update_this4 AS update_var2 } diff --git a/packages/graphql/tests/tck/issues/2262.test.ts b/packages/graphql/tests/tck/issues/2262.test.ts index 9fe7e140e1..84954e823f 100644 --- a/packages/graphql/tests/tck/issues/2262.test.ts +++ b/packages/graphql/tests/tck/issues/2262.test.ts @@ -71,14 +71,14 @@ describe("https://github.com/neo4j/graphql/issues/2262", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Component\`) + "MATCH (this:Component) WHERE this.uuid = $param0 CALL { WITH this - MATCH (this)<-[this0:\`OUTPUT\`]-(this1:\`Process\`) + MATCH (this)<-[this0:OUTPUT]-(this1:Process) CALL { WITH this1 - MATCH (this1:\`Process\`)<-[this2:\`INPUT\`]-(this3:\`Component\`) + MATCH (this1:Process)<-[this2:INPUT]-(this3:Component) WITH this2, this3 ORDER BY this3.uuid DESC WITH { node: { uuid: this3.uuid } } AS edge diff --git a/packages/graphql/tests/tck/issues/2267.test.ts b/packages/graphql/tests/tck/issues/2267.test.ts index fc18ca76be..7d13193241 100644 --- a/packages/graphql/tests/tck/issues/2267.test.ts +++ b/packages/graphql/tests/tck/issues/2267.test.ts @@ -69,19 +69,19 @@ describe("https://github.com/neo4j/graphql/issues/2267", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Place\`) + "MATCH (this:Place) WITH * ORDER BY this.displayName ASC CALL { WITH this CALL { WITH * - MATCH (this)<-[this0:\`ACTIVITY\`]-(this1:\`Post\`) + MATCH (this)<-[this0:ACTIVITY]-(this1:Post) WITH this1 { __resolveType: \\"Post\\", __id: id(this), .name } AS this1 RETURN this1 AS var2 UNION WITH * - MATCH (this)<-[this3:\`ACTIVITY\`]-(this4:\`Story\`) + MATCH (this)<-[this3:ACTIVITY]-(this4:Story) WITH this4 { __resolveType: \\"Story\\", __id: id(this), .name } AS this4 RETURN this4 AS var2 } diff --git a/packages/graphql/tests/tck/issues/2396.test.ts b/packages/graphql/tests/tck/issues/2396.test.ts index d76ca59c95..5c8385d680 100644 --- a/packages/graphql/tests/tck/issues/2396.test.ts +++ b/packages/graphql/tests/tck/issues/2396.test.ts @@ -160,17 +160,17 @@ describe("https://github.com/neo4j/graphql/issues/2396", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Mandate\`) + "MATCH (this:Mandate) CALL { WITH this - MATCH (this)-[:\`HAS_VALUATION\`]->(this0:\`Valuation\`) + MATCH (this)-[:HAS_VALUATION]->(this0:Valuation) CALL { WITH this0 - MATCH (this0)-[:\`VALUATION_FOR\`]->(this1:\`Estate\`) + MATCH (this0)-[:VALUATION_FOR]->(this1:Estate) CALL { WITH this1 - MATCH (this1)-[:\`HAS_ADDRESS\`]->(this2:\`Address\`) - OPTIONAL MATCH (this2)-[:\`HAS_POSTAL_CODE\`]->(this3:\`PostalCode\`) + MATCH (this1)-[:HAS_ADDRESS]->(this2:Address) + OPTIONAL MATCH (this2)-[:HAS_POSTAL_CODE]->(this3:PostalCode) WITH *, count(this3) AS postalCodeCount WITH * WHERE (postalCodeCount <> 0 AND this3.number IN $param0) @@ -188,11 +188,11 @@ describe("https://github.com/neo4j/graphql/issues/2396", () => { WHERE ((this.price >= $param4 AND var6 = true) AND ($isAuthenticated = true AND this.archivedAt IS NULL)) CALL { WITH this - MATCH (this)-[this7:\`HAS_VALUATION\`]->(this8:\`Valuation\`) + MATCH (this)-[this7:HAS_VALUATION]->(this8:Valuation) WHERE ($isAuthenticated = true AND this8.archivedAt IS NULL) CALL { WITH this8 - MATCH (this8)-[this9:\`VALUATION_FOR\`]->(this10:\`Estate\`) + MATCH (this8)-[this9:VALUATION_FOR]->(this10:Estate) WHERE ($isAuthenticated = true AND this10.archivedAt IS NULL) WITH this10 { .uuid } AS this10 RETURN head(collect(this10)) AS var11 @@ -263,17 +263,17 @@ describe("https://github.com/neo4j/graphql/issues/2396", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Mandate\`) + "MATCH (this:Mandate) CALL { WITH this - MATCH (this)-[:\`HAS_VALUATION\`]->(this0:\`Valuation\`) + MATCH (this)-[:HAS_VALUATION]->(this0:Valuation) CALL { WITH this0 - MATCH (this0)-[:\`VALUATION_FOR\`]->(this1:\`Estate\`) + MATCH (this0)-[:VALUATION_FOR]->(this1:Estate) CALL { WITH this1 - MATCH (this1)-[:\`HAS_ADDRESS\`]->(this2:\`Address\`) - OPTIONAL MATCH (this2)-[:\`HAS_POSTAL_CODE\`]->(this3:\`PostalCode\`) + MATCH (this1)-[:HAS_ADDRESS]->(this2:Address) + OPTIONAL MATCH (this2)-[:HAS_POSTAL_CODE]->(this3:PostalCode) WITH *, count(this3) AS postalCodeCount WITH * WHERE (postalCodeCount <> 0 AND this3.number IN $param0) @@ -294,11 +294,11 @@ describe("https://github.com/neo4j/graphql/issues/2396", () => { LIMIT $param7 CALL { WITH this - MATCH (this)-[this7:\`HAS_VALUATION\`]->(this8:\`Valuation\`) + MATCH (this)-[this7:HAS_VALUATION]->(this8:Valuation) WHERE ($isAuthenticated = true AND this8.archivedAt IS NULL) CALL { WITH this8 - MATCH (this8)-[this9:\`VALUATION_FOR\`]->(this10:\`Estate\`) + MATCH (this8)-[this9:VALUATION_FOR]->(this10:Estate) WHERE ($isAuthenticated = true AND this10.archivedAt IS NULL) WITH this10 { .uuid } AS this10 RETURN head(collect(this10)) AS var11 @@ -377,17 +377,17 @@ describe("https://github.com/neo4j/graphql/issues/2396", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Mandate\`) + "MATCH (this:Mandate) CALL { WITH this - MATCH (this)-[:\`HAS_VALUATION\`]->(this0:\`Valuation\`) + MATCH (this)-[:HAS_VALUATION]->(this0:Valuation) CALL { WITH this0 - MATCH (this0)-[:\`VALUATION_FOR\`]->(this1:\`Estate\`) + MATCH (this0)-[:VALUATION_FOR]->(this1:Estate) CALL { WITH this1 - MATCH (this1)-[:\`HAS_ADDRESS\`]->(this2:\`Address\`) - OPTIONAL MATCH (this2)-[:\`HAS_POSTAL_CODE\`]->(this3:\`PostalCode\`) + MATCH (this1)-[:HAS_ADDRESS]->(this2:Address) + OPTIONAL MATCH (this2)-[:HAS_POSTAL_CODE]->(this3:PostalCode) WITH *, count(this3) AS postalCodeCount WITH * WHERE (postalCodeCount <> 0 AND this3.number IN $param0) @@ -408,11 +408,11 @@ describe("https://github.com/neo4j/graphql/issues/2396", () => { LIMIT $param7 CALL { WITH this - MATCH (this)-[this7:\`HAS_VALUATION\`]->(this8:\`Valuation\`) + MATCH (this)-[this7:HAS_VALUATION]->(this8:Valuation) WHERE ($isAuthenticated = true AND this8.archivedAt IS NULL) CALL { WITH this8 - MATCH (this8)-[this9:\`VALUATION_FOR\`]->(this10:\`Estate\`) + MATCH (this8)-[this9:VALUATION_FOR]->(this10:Estate) WHERE ($isAuthenticated = true AND this10.archivedAt IS NULL) WITH this10 { .uuid } AS this10 RETURN head(collect(this10)) AS var11 diff --git a/packages/graphql/tests/tck/issues/2437.test.ts b/packages/graphql/tests/tck/issues/2437.test.ts index 0d543bca3b..0c80bc440b 100644 --- a/packages/graphql/tests/tck/issues/2437.test.ts +++ b/packages/graphql/tests/tck/issues/2437.test.ts @@ -79,12 +79,12 @@ describe("https://github.com/neo4j/graphql/issues/2437", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Agent\`) + "MATCH (this:Agent) WITH * WHERE (this.uuid = $param0 AND ($isAuthenticated = true AND this.archivedAt IS NULL)) CALL { WITH this - MATCH (this)-[this0:\`IS_VALUATION_AGENT\`]->(this1:\`Valuation\`) + MATCH (this)-[this0:IS_VALUATION_AGENT]->(this1:Valuation) WHERE ($isAuthenticated = true AND this1.archivedAt IS NULL) WITH { node: { uuid: this1.uuid } } AS edge WITH collect(edge) AS edges diff --git a/packages/graphql/tests/tck/issues/2581.test.ts b/packages/graphql/tests/tck/issues/2581.test.ts index 6f6e6d3ab5..4e6f306ea7 100644 --- a/packages/graphql/tests/tck/issues/2581.test.ts +++ b/packages/graphql/tests/tck/issues/2581.test.ts @@ -91,7 +91,7 @@ describe("https://github.com/neo4j/graphql/issues/2581", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Author\`) + "MATCH (this:Author) CALL { WITH this CALL { @@ -134,7 +134,7 @@ describe("https://github.com/neo4j/graphql/issues/2581", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Author\`) + "MATCH (this:Author) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/issues/2614.test.ts b/packages/graphql/tests/tck/issues/2614.test.ts index 30424f6eff..af86557a42 100644 --- a/packages/graphql/tests/tck/issues/2614.test.ts +++ b/packages/graphql/tests/tck/issues/2614.test.ts @@ -72,12 +72,12 @@ describe("https://github.com/neo4j/graphql/issues/2614", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this CALL { WITH * - MATCH (this)-[this0:\`ACTED_IN\`]->(this1:\`Film\`) + MATCH (this)-[this0:ACTED_IN]->(this1:Film) WHERE this1.title = $param0 WITH this1 { __resolveType: \\"Movie\\", __id: id(this), .title } AS this1 RETURN this1 AS var2 diff --git a/packages/graphql/tests/tck/issues/2670.test.ts b/packages/graphql/tests/tck/issues/2670.test.ts index c2a0e445c3..e934d01cb1 100644 --- a/packages/graphql/tests/tck/issues/2670.test.ts +++ b/packages/graphql/tests/tck/issues/2670.test.ts @@ -64,13 +64,13 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[this0:\`IN_GENRE\`]->(this1:\`Genre\`) + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) CALL { WITH this1 - MATCH (this1)<-[this2:\`IN_GENRE\`]-(this3:\`Movie\`) + MATCH (this1)<-[this2:IN_GENRE]-(this3:Movie) RETURN count(this3) = $param0 AS var4 } WITH * @@ -104,13 +104,13 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[this0:\`IN_GENRE\`]->(this1:\`Genre\`) + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) CALL { WITH this1 - MATCH (this1)<-[this2:\`IN_GENRE\`]-(this3:\`Movie\`) + MATCH (this1)<-[this2:IN_GENRE]-(this3:Movie) RETURN count(this3) < $param0 AS var4 } WITH * @@ -144,13 +144,13 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[this0:\`IN_GENRE\`]->(this1:\`Genre\`) + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) CALL { WITH this1 - MATCH (this1)<-[this2:\`IN_GENRE\`]-(this3:\`Movie\`) + MATCH (this1)<-[this2:IN_GENRE]-(this3:Movie) RETURN count(this3) > $param0 AS var4 } WITH * @@ -186,13 +186,13 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[this0:\`IN_GENRE\`]->(this1:\`Genre\`) + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) CALL { WITH this1 - MATCH (this1)<-[this2:\`IN_GENRE\`]-(this3:\`Movie\`) + MATCH (this1)<-[this2:IN_GENRE]-(this3:Movie) RETURN min(size(this3.title)) = $param0 AS var4 } WITH * @@ -228,13 +228,13 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[this0:\`IN_GENRE\`]->(this1:\`Genre\`) + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) CALL { WITH this1 - MATCH (this1)<-[this2:\`IN_GENRE\`]-(this3:\`Movie\`) + MATCH (this1)<-[this2:IN_GENRE]-(this3:Movie) RETURN avg(size(this3.title)) = $param0 AS var4 } WITH * @@ -265,13 +265,13 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[this0:\`IN_GENRE\`]->(this1:\`Genre\`) + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) CALL { WITH this1 - MATCH (this1)<-[this2:\`IN_GENRE\`]-(this3:\`Movie\`) + MATCH (this1)<-[this2:IN_GENRE]-(this3:Movie) RETURN max(this2.intValue) < $param0 AS var4 } WITH * @@ -307,13 +307,13 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[this0:\`IN_GENRE\`]->(this1:\`Genre\`) + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) CALL { WITH this1 - MATCH (this1)<-[this2:\`IN_GENRE\`]-(this3:\`Movie\`) + MATCH (this1)<-[this2:IN_GENRE]-(this3:Movie) RETURN min(this2.intValue) = $param0 AS var4 } WITH * @@ -347,13 +347,13 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[this0:\`IN_GENRE\`]->(this1:\`Genre\`) + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) CALL { WITH this1 - MATCH (this1)<-[this2:\`IN_GENRE\`]-(this3:\`Movie\`) + MATCH (this1)<-[this2:IN_GENRE]-(this3:Movie) RETURN count(this3) = $param0 AS var4 } WITH * @@ -387,13 +387,13 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[this0:\`IN_GENRE\`]->(this1:\`Genre\`) + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) CALL { WITH this1 - MATCH (this1)<-[this2:\`IN_GENRE\`]-(this3:\`Movie\`) + MATCH (this1)<-[this2:IN_GENRE]-(this3:Movie) RETURN count(this3) = $param0 AS var4 } WITH * @@ -427,13 +427,13 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[this0:\`IN_GENRE\`]->(this1:\`Genre\`) + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) CALL { WITH this1 - MATCH (this1)<-[this2:\`IN_GENRE\`]-(this3:\`Movie\`) + MATCH (this1)<-[this2:IN_GENRE]-(this3:Movie) RETURN count(this3) = $param0 AS var4 } WITH * @@ -442,10 +442,10 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { } CALL { WITH this - MATCH (this)-[this0:\`IN_GENRE\`]->(this1:\`Genre\`) + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) CALL { WITH this1 - MATCH (this1)<-[this6:\`IN_GENRE\`]-(this7:\`Movie\`) + MATCH (this1)<-[this6:IN_GENRE]-(this7:Movie) RETURN count(this7) = $param1 AS var8 } WITH * @@ -483,13 +483,13 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[this0:\`IN_GENRE\`]->(this1:\`Genre\`) + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) CALL { WITH this1 - MATCH (this1)<-[this2:\`IN_GENRE\`]-(this3:\`Movie\`) + MATCH (this1)<-[this2:IN_GENRE]-(this3:Movie) RETURN count(this3) = $param0 AS var4 } WITH * @@ -523,13 +523,13 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[this0:\`IN_GENRE\`]->(this1:\`Genre\`) + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) CALL { WITH this1 - MATCH (this1)<-[this2:\`IN_GENRE\`]-(this3:\`Movie\`) + MATCH (this1)<-[this2:IN_GENRE]-(this3:Movie) RETURN count(this3) = $param0 AS var4 } WITH * @@ -572,18 +572,18 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[this0:\`IN_GENRE\`]->(this1:\`Genre\`) + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) CALL { WITH this1 - MATCH (this1)<-[this2:\`IN_GENRE\`]-(this3:\`Movie\`) + MATCH (this1)<-[this2:IN_GENRE]-(this3:Movie) RETURN count(this3) = $param0 AS var4 } CALL { WITH this1 - MATCH (this1)<-[this5:\`IN_GENRE\`]-(this6:\`Series\`) + MATCH (this1)<-[this5:IN_GENRE]-(this6:Series) RETURN min(size(this6.name)) = $param1 AS var7 } WITH * @@ -630,18 +630,18 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[this0:\`IN_GENRE\`]->(this1:\`Genre\`) + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) CALL { WITH this1 - MATCH (this1)<-[this2:\`IN_GENRE\`]-(this3:\`Movie\`) + MATCH (this1)<-[this2:IN_GENRE]-(this3:Movie) RETURN count(this3) = $param0 AS var4 } CALL { WITH this1 - MATCH (this1)<-[this5:\`IN_GENRE\`]-(this6:\`Series\`) + MATCH (this1)<-[this5:IN_GENRE]-(this6:Series) RETURN min(size(this6.name)) = $param1 AS var7 } WITH * @@ -688,18 +688,18 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[this0:\`IN_GENRE\`]->(this1:\`Genre\`) + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) CALL { WITH this1 - MATCH (this1)<-[this2:\`IN_GENRE\`]-(this3:\`Movie\`) + MATCH (this1)<-[this2:IN_GENRE]-(this3:Movie) RETURN count(this3) = $param0 AS var4 } CALL { WITH this1 - MATCH (this1)<-[this5:\`IN_GENRE\`]-(this6:\`Series\`) + MATCH (this1)<-[this5:IN_GENRE]-(this6:Series) RETURN min(size(this6.name)) = $param1 AS var7 } WITH * @@ -742,18 +742,18 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[this0:\`IN_GENRE\`]->(this1:\`Genre\`) + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) RETURN count(this1) = $param0 AS var2 } CALL { WITH this - MATCH (this)-[this3:\`IN_GENRE\`]->(this4:\`Genre\`) + MATCH (this)-[this3:IN_GENRE]->(this4:Genre) CALL { WITH this4 - MATCH (this4)<-[this5:\`IN_GENRE\`]-(this6:\`Movie\`) + MATCH (this4)<-[this5:IN_GENRE]-(this6:Movie) RETURN count(this6) = $param1 AS var7 } WITH * diff --git a/packages/graphql/tests/tck/issues/2708.test.ts b/packages/graphql/tests/tck/issues/2708.test.ts index 023ef1d510..3f318a64af 100644 --- a/packages/graphql/tests/tck/issues/2708.test.ts +++ b/packages/graphql/tests/tck/issues/2708.test.ts @@ -64,13 +64,13 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[:\`IN_GENRE\`]->(this0:\`Genre\`) + MATCH (this)-[:IN_GENRE]->(this0:Genre) CALL { WITH this0 - MATCH (this0)<-[this1:\`IN_GENRE\`]-(this2:\`Movie\`) + MATCH (this0)<-[this1:IN_GENRE]-(this2:Movie) RETURN count(this2) = $param0 AS var3 } WITH * @@ -104,13 +104,13 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[:\`IN_GENRE\`]->(this0:\`Genre\`) + MATCH (this)-[:IN_GENRE]->(this0:Genre) CALL { WITH this0 - MATCH (this0)<-[this1:\`IN_GENRE\`]-(this2:\`Movie\`) + MATCH (this0)<-[this1:IN_GENRE]-(this2:Movie) RETURN count(this2) < $param0 AS var3 } WITH * @@ -144,13 +144,13 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[:\`IN_GENRE\`]->(this0:\`Genre\`) + MATCH (this)-[:IN_GENRE]->(this0:Genre) CALL { WITH this0 - MATCH (this0)<-[this1:\`IN_GENRE\`]-(this2:\`Movie\`) + MATCH (this0)<-[this1:IN_GENRE]-(this2:Movie) RETURN count(this2) > $param0 AS var3 } WITH * @@ -184,13 +184,13 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[:\`IN_GENRE\`]->(this0:\`Genre\`) + MATCH (this)-[:IN_GENRE]->(this0:Genre) CALL { WITH this0 - MATCH (this0)<-[this1:\`IN_GENRE\`]-(this2:\`Movie\`) + MATCH (this0)<-[this1:IN_GENRE]-(this2:Movie) RETURN min(size(this2.title)) = $param0 AS var3 } WITH * @@ -224,13 +224,13 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[:\`IN_GENRE\`]->(this0:\`Genre\`) + MATCH (this)-[:IN_GENRE]->(this0:Genre) CALL { WITH this0 - MATCH (this0)<-[this1:\`IN_GENRE\`]-(this2:\`Movie\`) + MATCH (this0)<-[this1:IN_GENRE]-(this2:Movie) RETURN avg(size(this2.title)) = $param0 AS var3 } WITH * @@ -261,13 +261,13 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[:\`IN_GENRE\`]->(this0:\`Genre\`) + MATCH (this)-[:IN_GENRE]->(this0:Genre) CALL { WITH this0 - MATCH (this0)<-[this1:\`IN_GENRE\`]-(this2:\`Movie\`) + MATCH (this0)<-[this1:IN_GENRE]-(this2:Movie) RETURN max(this1.intValue) < $param0 AS var3 } WITH * @@ -301,13 +301,13 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[:\`IN_GENRE\`]->(this0:\`Genre\`) + MATCH (this)-[:IN_GENRE]->(this0:Genre) CALL { WITH this0 - MATCH (this0)<-[this1:\`IN_GENRE\`]-(this2:\`Movie\`) + MATCH (this0)<-[this1:IN_GENRE]-(this2:Movie) RETURN min(this1.intValue) = $param0 AS var3 } WITH * @@ -341,13 +341,13 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[:\`IN_GENRE\`]->(this0:\`Genre\`) + MATCH (this)-[:IN_GENRE]->(this0:Genre) CALL { WITH this0 - MATCH (this0)<-[this1:\`IN_GENRE\`]-(this2:\`Movie\`) + MATCH (this0)<-[this1:IN_GENRE]-(this2:Movie) RETURN count(this2) = $param0 AS var3 } WITH * @@ -381,13 +381,13 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[:\`IN_GENRE\`]->(this0:\`Genre\`) + MATCH (this)-[:IN_GENRE]->(this0:Genre) CALL { WITH this0 - MATCH (this0)<-[this1:\`IN_GENRE\`]-(this2:\`Movie\`) + MATCH (this0)<-[this1:IN_GENRE]-(this2:Movie) RETURN count(this2) = $param0 AS var3 } WITH * @@ -421,13 +421,13 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[:\`IN_GENRE\`]->(this0:\`Genre\`) + MATCH (this)-[:IN_GENRE]->(this0:Genre) CALL { WITH this0 - MATCH (this0)<-[this1:\`IN_GENRE\`]-(this2:\`Movie\`) + MATCH (this0)<-[this1:IN_GENRE]-(this2:Movie) RETURN count(this2) = $param0 AS var3 } WITH * @@ -436,10 +436,10 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { } CALL { WITH this - MATCH (this)-[:\`IN_GENRE\`]->(this0:\`Genre\`) + MATCH (this)-[:IN_GENRE]->(this0:Genre) CALL { WITH this0 - MATCH (this0)<-[this5:\`IN_GENRE\`]-(this6:\`Movie\`) + MATCH (this0)<-[this5:IN_GENRE]-(this6:Movie) RETURN count(this6) = $param1 AS var7 } WITH * @@ -477,13 +477,13 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[:\`IN_GENRE\`]->(this0:\`Genre\`) + MATCH (this)-[:IN_GENRE]->(this0:Genre) CALL { WITH this0 - MATCH (this0)<-[this1:\`IN_GENRE\`]-(this2:\`Movie\`) + MATCH (this0)<-[this1:IN_GENRE]-(this2:Movie) RETURN count(this2) = $param0 AS var3 } WITH * @@ -517,13 +517,13 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[:\`IN_GENRE\`]->(this0:\`Genre\`) + MATCH (this)-[:IN_GENRE]->(this0:Genre) CALL { WITH this0 - MATCH (this0)<-[this1:\`IN_GENRE\`]-(this2:\`Movie\`) + MATCH (this0)<-[this1:IN_GENRE]-(this2:Movie) RETURN count(this2) = $param0 AS var3 } WITH * @@ -557,13 +557,13 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[:\`IN_GENRE\`]->(this0:\`Genre\`) + MATCH (this)-[:IN_GENRE]->(this0:Genre) CALL { WITH this0 - MATCH (this0)<-[this1:\`IN_GENRE\`]-(this2:\`Movie\`) + MATCH (this0)<-[this1:IN_GENRE]-(this2:Movie) RETURN count(this2) = $param0 AS var3 } WITH * @@ -572,10 +572,10 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { } CALL { WITH this - MATCH (this)-[:\`IN_GENRE\`]->(this0:\`Genre\`) + MATCH (this)-[:IN_GENRE]->(this0:Genre) CALL { WITH this0 - MATCH (this0)<-[this5:\`IN_GENRE\`]-(this6:\`Movie\`) + MATCH (this0)<-[this5:IN_GENRE]-(this6:Movie) RETURN count(this6) = $param1 AS var7 } WITH * @@ -622,18 +622,18 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[:\`IN_GENRE\`]->(this0:\`Genre\`) + MATCH (this)-[:IN_GENRE]->(this0:Genre) CALL { WITH this0 - MATCH (this0)<-[this1:\`IN_GENRE\`]-(this2:\`Movie\`) + MATCH (this0)<-[this1:IN_GENRE]-(this2:Movie) RETURN count(this2) = $param0 AS var3 } CALL { WITH this0 - MATCH (this0)<-[this4:\`IN_GENRE\`]-(this5:\`Series\`) + MATCH (this0)<-[this4:IN_GENRE]-(this5:Series) RETURN min(size(this5.name)) = $param1 AS var6 } WITH * @@ -680,18 +680,18 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[:\`IN_GENRE\`]->(this0:\`Genre\`) + MATCH (this)-[:IN_GENRE]->(this0:Genre) CALL { WITH this0 - MATCH (this0)<-[this1:\`IN_GENRE\`]-(this2:\`Movie\`) + MATCH (this0)<-[this1:IN_GENRE]-(this2:Movie) RETURN count(this2) = $param0 AS var3 } CALL { WITH this0 - MATCH (this0)<-[this4:\`IN_GENRE\`]-(this5:\`Series\`) + MATCH (this0)<-[this4:IN_GENRE]-(this5:Series) RETURN min(size(this5.name)) = $param1 AS var6 } WITH * @@ -733,18 +733,18 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[:\`IN_GENRE\`]->(this0:\`Genre\`) + MATCH (this)-[:IN_GENRE]->(this0:Genre) CALL { WITH this0 - MATCH (this0)<-[this1:\`IN_GENRE\`]-(this2:\`Movie\`) + MATCH (this0)<-[this1:IN_GENRE]-(this2:Movie) RETURN count(this2) = $param0 AS var3 } CALL { WITH this0 - MATCH (this0)<-[this4:\`IN_GENRE\`]-(this5:\`Series\`) + MATCH (this0)<-[this4:IN_GENRE]-(this5:Series) RETURN min(size(this5.name)) = $param1 AS var6 } WITH * @@ -782,13 +782,13 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[:\`IN_GENRE\`]->(this0:\`Genre\`) + MATCH (this)-[:IN_GENRE]->(this0:Genre) CALL { WITH this0 - MATCH (this0)<-[this1:\`IN_GENRE\`]-(this2:\`Movie\`) + MATCH (this0)<-[this1:IN_GENRE]-(this2:Movie) RETURN count(this2) = $param0 AS var3 } WITH * @@ -797,7 +797,7 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { } CALL { WITH this - MATCH (this)-[this5:\`IN_GENRE\`]->(this6:\`Genre\`) + MATCH (this)-[this5:IN_GENRE]->(this6:Genre) RETURN count(this6) = $param1 AS var7 } WITH * diff --git a/packages/graphql/tests/tck/issues/2709.test.ts b/packages/graphql/tests/tck/issues/2709.test.ts index 34adca9743..a90b055bba 100644 --- a/packages/graphql/tests/tck/issues/2709.test.ts +++ b/packages/graphql/tests/tck/issues/2709.test.ts @@ -105,9 +105,9 @@ describe("https://github.com/neo4j/graphql/issues/2709", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Film\`) + "MATCH (this:Film) WHERE EXISTS { - MATCH (this)<-[this0:\`DISTRIBUTED_BY\`]-(this1:\`Netflix\`) + MATCH (this)<-[this0:DISTRIBUTED_BY]-(this1:Netflix) WHERE this1.name = $param0 } RETURN this { .title } AS this" @@ -133,9 +133,9 @@ describe("https://github.com/neo4j/graphql/issues/2709", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Film\`) + "MATCH (this:Film) WHERE EXISTS { - MATCH (this)<-[this0:\`DISTRIBUTED_BY\`]-(this1:\`Dishney\`) + MATCH (this)<-[this0:DISTRIBUTED_BY]-(this1:Dishney) WHERE this1.name = $param0 } RETURN this { .title } AS this" @@ -159,9 +159,9 @@ describe("https://github.com/neo4j/graphql/issues/2709", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Film\`) + "MATCH (this:Film) WHERE EXISTS { - MATCH (this)<-[this0:\`DISTRIBUTED_BY\`]-(this1:\`Dishney\`) + MATCH (this)<-[this0:DISTRIBUTED_BY]-(this1:Dishney) WHERE this1.name = $param0 } RETURN this { .title } AS this" @@ -185,10 +185,10 @@ describe("https://github.com/neo4j/graphql/issues/2709", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Film\`) + "MATCH (this:Film) WHERE EXISTS { - MATCH (this)<-[this0:\`DISTRIBUTED_BY\`]-(this1) - WHERE (this1.name = $param0 AND (this1:\`Dishney\` OR this1:\`Prime\` OR this1:\`Netflix\`)) + MATCH (this)<-[this0:DISTRIBUTED_BY]-(this1) + WHERE (this1.name = $param0 AND (this1:Dishney OR this1:Prime OR this1:Netflix)) } RETURN this { .title } AS this" `); diff --git a/packages/graphql/tests/tck/issues/2713.test.ts b/packages/graphql/tests/tck/issues/2713.test.ts index 5d8dc9dc59..e422622b9b 100644 --- a/packages/graphql/tests/tck/issues/2713.test.ts +++ b/packages/graphql/tests/tck/issues/2713.test.ts @@ -64,13 +64,13 @@ describe("https://github.com/neo4j/graphql/issues/2713", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[this0:\`IN_GENRE\`]->(this1:\`Genre\`) + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) CALL { WITH this1 - MATCH (this1)<-[this2:\`IN_GENRE\`]-(this3:\`Movie\`) + MATCH (this1)<-[this2:IN_GENRE]-(this3:Movie) RETURN count(this3) = $param0 AS var4 } WITH * @@ -79,10 +79,10 @@ describe("https://github.com/neo4j/graphql/issues/2713", () => { } CALL { WITH this - MATCH (this)-[this0:\`IN_GENRE\`]->(this1:\`Genre\`) + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) CALL { WITH this1 - MATCH (this1)<-[this6:\`IN_GENRE\`]-(this7:\`Movie\`) + MATCH (this1)<-[this6:IN_GENRE]-(this7:Movie) RETURN count(this7) = $param1 AS var8 } WITH * diff --git a/packages/graphql/tests/tck/issues/2782.test.ts b/packages/graphql/tests/tck/issues/2782.test.ts index 4ec9e1a7cf..199de7d512 100644 --- a/packages/graphql/tests/tck/issues/2782.test.ts +++ b/packages/graphql/tests/tck/issues/2782.test.ts @@ -96,13 +96,13 @@ describe("https://github.com/neo4j/graphql/issues/2782", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Product\`) + "MATCH (this:Product) SET this.id = $this_update_id SET this.name = $this_update_name WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_colors0_disconnect0_rel:\`HAS_COLOR\`]->(this_colors0_disconnect0:Color) + OPTIONAL MATCH (this)-[this_colors0_disconnect0_rel:HAS_COLOR]->(this_colors0_disconnect0:Color) WHERE this_colors0_disconnect0.name = $updateProducts_args_update_colors0_disconnect0_where_Color_this_colors0_disconnect0param0 CALL { WITH this_colors0_disconnect0, this_colors0_disconnect0_rel, this @@ -112,7 +112,7 @@ describe("https://github.com/neo4j/graphql/issues/2782", () => { } CALL { WITH this, this_colors0_disconnect0 - OPTIONAL MATCH (this_colors0_disconnect0)<-[this_colors0_disconnect0_photos0_rel:\`OF_COLOR\`]-(this_colors0_disconnect0_photos0:Photo) + OPTIONAL MATCH (this_colors0_disconnect0)<-[this_colors0_disconnect0_photos0_rel:OF_COLOR]-(this_colors0_disconnect0_photos0:Photo) WHERE this_colors0_disconnect0_photos0.id = $updateProducts_args_update_colors0_disconnect0_disconnect_photos0_where_Photo_this_colors0_disconnect0_photos0param0 CALL { WITH this_colors0_disconnect0_photos0, this_colors0_disconnect0_photos0_rel, this_colors0_disconnect0 @@ -122,7 +122,7 @@ describe("https://github.com/neo4j/graphql/issues/2782", () => { } CALL { WITH this, this_colors0_disconnect0, this_colors0_disconnect0_photos0 - OPTIONAL MATCH (this_colors0_disconnect0_photos0)-[this_colors0_disconnect0_photos0_color0_rel:\`OF_COLOR\`]->(this_colors0_disconnect0_photos0_color0:Color) + OPTIONAL MATCH (this_colors0_disconnect0_photos0)-[this_colors0_disconnect0_photos0_color0_rel:OF_COLOR]->(this_colors0_disconnect0_photos0_color0:Color) WHERE this_colors0_disconnect0_photos0_color0.id = $updateProducts_args_update_colors0_disconnect0_disconnect_photos_disconnect_color_where_Color_this_colors0_disconnect0_photos0_color0param0 CALL { WITH this_colors0_disconnect0_photos0_color0, this_colors0_disconnect0_photos0_color0_rel, this_colors0_disconnect0_photos0 @@ -139,7 +139,7 @@ describe("https://github.com/neo4j/graphql/issues/2782", () => { WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_photos0_disconnect0_rel:\`HAS_PHOTO\`]->(this_photos0_disconnect0:Photo) + OPTIONAL MATCH (this)-[this_photos0_disconnect0_rel:HAS_PHOTO]->(this_photos0_disconnect0:Photo) WHERE this_photos0_disconnect0.id = $updateProducts_args_update_photos0_disconnect0_where_Photo_this_photos0_disconnect0param0 CALL { WITH this_photos0_disconnect0, this_photos0_disconnect0_rel, this @@ -149,7 +149,7 @@ describe("https://github.com/neo4j/graphql/issues/2782", () => { } CALL { WITH this, this_photos0_disconnect0 - OPTIONAL MATCH (this_photos0_disconnect0)-[this_photos0_disconnect0_color0_rel:\`OF_COLOR\`]->(this_photos0_disconnect0_color0:Color) + OPTIONAL MATCH (this_photos0_disconnect0)-[this_photos0_disconnect0_color0_rel:OF_COLOR]->(this_photos0_disconnect0_color0:Color) WHERE this_photos0_disconnect0_color0.name = $updateProducts_args_update_photos0_disconnect_disconnect_color_where_Color_this_photos0_disconnect0_color0param0 CALL { WITH this_photos0_disconnect0_color0, this_photos0_disconnect0_color0_rel, this_photos0_disconnect0 @@ -164,7 +164,7 @@ describe("https://github.com/neo4j/graphql/issues/2782", () => { WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_photos0_disconnect1_rel:\`HAS_PHOTO\`]->(this_photos0_disconnect1:Photo) + OPTIONAL MATCH (this)-[this_photos0_disconnect1_rel:HAS_PHOTO]->(this_photos0_disconnect1:Photo) WHERE this_photos0_disconnect1.id = $updateProducts_args_update_photos0_disconnect1_where_Photo_this_photos0_disconnect1param0 CALL { WITH this_photos0_disconnect1, this_photos0_disconnect1_rel, this @@ -174,7 +174,7 @@ describe("https://github.com/neo4j/graphql/issues/2782", () => { } CALL { WITH this, this_photos0_disconnect1 - OPTIONAL MATCH (this_photos0_disconnect1)-[this_photos0_disconnect1_color0_rel:\`OF_COLOR\`]->(this_photos0_disconnect1_color0:Color) + OPTIONAL MATCH (this_photos0_disconnect1)-[this_photos0_disconnect1_color0_rel:OF_COLOR]->(this_photos0_disconnect1_color0:Color) WHERE this_photos0_disconnect1_color0.name = $updateProducts_args_update_photos0_disconnect_disconnect_color_where_Color_this_photos0_disconnect1_color0param0 CALL { WITH this_photos0_disconnect1_color0, this_photos0_disconnect1_color0_rel, this_photos0_disconnect1 diff --git a/packages/graphql/tests/tck/issues/2789.test.ts b/packages/graphql/tests/tck/issues/2789.test.ts index f4c6de0f3d..34908911e6 100644 --- a/packages/graphql/tests/tck/issues/2789.test.ts +++ b/packages/graphql/tests/tck/issues/2789.test.ts @@ -52,7 +52,7 @@ describe("https://github.com/neo4j/graphql/issues/2789", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this.id = $param1), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this diff --git a/packages/graphql/tests/tck/issues/2803.test.ts b/packages/graphql/tests/tck/issues/2803.test.ts index caf0896666..c55a99bf78 100644 --- a/packages/graphql/tests/tck/issues/2803.test.ts +++ b/packages/graphql/tests/tck/issues/2803.test.ts @@ -59,16 +59,16 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this - MATCH (this)-[:\`ACTED_IN\`]->(this0:\`Movie\`) + MATCH (this)-[:ACTED_IN]->(this0:Movie) CALL { WITH this0 - MATCH (this0)<-[:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this0)<-[:ACTED_IN]-(this1:Actor) CALL { WITH this1 - MATCH (this1)-[this2:\`ACTED_IN\`]->(this3:\`Movie\`) + MATCH (this1)-[this2:ACTED_IN]->(this3:Movie) RETURN count(this3) > $param0 AS var4 } WITH * @@ -77,10 +77,10 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { } CALL { WITH this0 - MATCH (this0)<-[:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this0)<-[:ACTED_IN]-(this1:Actor) CALL { WITH this1 - MATCH (this1)-[this6:\`ACTED_IN\`]->(this7:\`Movie\`) + MATCH (this1)-[this6:ACTED_IN]->(this7:Movie) RETURN count(this7) > $param1 AS var8 } WITH * @@ -126,21 +126,21 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this - MATCH (this)-[:\`ACTED_IN\`]->(this0:\`Movie\`) + MATCH (this)-[:ACTED_IN]->(this0:Movie) CALL { WITH this0 - MATCH (this0)<-[this1:\`ACTED_IN\`]-(this2:\`Actor\`) + MATCH (this0)<-[this1:ACTED_IN]-(this2:Actor) RETURN count(this2) = $param0 AS var3 } CALL { WITH this0 - MATCH (this0)<-[:\`ACTED_IN\`]-(this4:\`Actor\`) + MATCH (this0)<-[:ACTED_IN]-(this4:Actor) CALL { WITH this4 - MATCH (this4)-[this5:\`ACTED_IN\`]->(this6:\`Movie\`) + MATCH (this4)-[this5:ACTED_IN]->(this6:Movie) RETURN count(this6) > $param1 AS var7 } WITH * @@ -149,10 +149,10 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { } CALL { WITH this0 - MATCH (this0)<-[:\`ACTED_IN\`]-(this4:\`Actor\`) + MATCH (this0)<-[:ACTED_IN]-(this4:Actor) CALL { WITH this4 - MATCH (this4)-[this9:\`ACTED_IN\`]->(this10:\`Movie\`) + MATCH (this4)-[this9:ACTED_IN]->(this10:Movie) RETURN count(this10) > $param2 AS var11 } WITH * @@ -198,19 +198,19 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[:\`ACTED_IN\`]-(this0:\`Actor\`) + MATCH (this)<-[:ACTED_IN]-(this0:Actor) CALL { WITH this0 - MATCH (this0)-[:\`ACTED_IN\`]->(this1:\`Movie\`) + MATCH (this0)-[:ACTED_IN]->(this1:Movie) CALL { WITH this1 - MATCH (this1)<-[:\`ACTED_IN\`]-(this2:\`Actor\`) + MATCH (this1)<-[:ACTED_IN]-(this2:Actor) CALL { WITH this2 - MATCH (this2)-[this3:\`ACTED_IN\`]->(this4:\`Movie\`) + MATCH (this2)-[this3:ACTED_IN]->(this4:Movie) RETURN count(this4) > $param0 AS var5 } WITH * @@ -219,10 +219,10 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { } CALL { WITH this1 - MATCH (this1)<-[:\`ACTED_IN\`]-(this2:\`Actor\`) + MATCH (this1)<-[:ACTED_IN]-(this2:Actor) CALL { WITH this2 - MATCH (this2)-[this7:\`ACTED_IN\`]->(this8:\`Movie\`) + MATCH (this2)-[this7:ACTED_IN]->(this8:Movie) RETURN count(this8) > $param1 AS var9 } WITH * @@ -279,34 +279,34 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) RETURN avg(size(this1.name)) >= $param0 AS var2 } CALL { WITH this - MATCH (this)<-[:\`ACTED_IN\`]-(this3:\`Actor\`) + MATCH (this)<-[:ACTED_IN]-(this3:Actor) CALL { WITH this3 - MATCH (this3)-[this4:\`ACTED_IN\`]->(this5:\`Movie\`) + MATCH (this3)-[this4:ACTED_IN]->(this5:Movie) RETURN avg(this5.released) = $param1 AS var6 } CALL { WITH this3 - MATCH (this3)-[:\`ACTED_IN\`]->(this7:\`Movie\`) + MATCH (this3)-[:ACTED_IN]->(this7:Movie) CALL { WITH this7 - MATCH (this7)<-[this8:\`ACTED_IN\`]-(this9:\`Actor\`) + MATCH (this7)<-[this8:ACTED_IN]-(this9:Actor) RETURN avg(size(this9.name)) < $param2 AS var10 } CALL { WITH this7 - MATCH (this7)<-[:\`ACTED_IN\`]-(this11:\`Actor\`) + MATCH (this7)<-[:ACTED_IN]-(this11:Actor) CALL { WITH this11 - MATCH (this11)-[this12:\`ACTED_IN\`]->(this13:\`Movie\`) + MATCH (this11)-[this12:ACTED_IN]->(this13:Movie) RETURN count(this13) > $param3 AS var14 } WITH * @@ -315,10 +315,10 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { } CALL { WITH this7 - MATCH (this7)<-[:\`ACTED_IN\`]-(this11:\`Actor\`) + MATCH (this7)<-[:ACTED_IN]-(this11:Actor) CALL { WITH this11 - MATCH (this11)-[this16:\`ACTED_IN\`]->(this17:\`Movie\`) + MATCH (this11)-[this16:ACTED_IN]->(this17:Movie) RETURN count(this17) > $param4 AS var18 } WITH * @@ -373,16 +373,16 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this - MATCH (this)-[this0:\`ACTED_IN\`]->(this1:\`Movie\`) + MATCH (this)-[this0:ACTED_IN]->(this1:Movie) CALL { WITH this1 - MATCH (this1)<-[this2:\`ACTED_IN\`]-(this3:\`Actor\`) + MATCH (this1)<-[this2:ACTED_IN]-(this3:Actor) CALL { WITH this3 - MATCH (this3)-[this4:\`ACTED_IN\`]->(this5:\`Movie\`) + MATCH (this3)-[this4:ACTED_IN]->(this5:Movie) RETURN count(this5) > $param0 AS var6 } WITH * @@ -391,10 +391,10 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { } CALL { WITH this1 - MATCH (this1)<-[this2:\`ACTED_IN\`]-(this3:\`Actor\`) + MATCH (this1)<-[this2:ACTED_IN]-(this3:Actor) CALL { WITH this3 - MATCH (this3)-[this8:\`ACTED_IN\`]->(this9:\`Movie\`) + MATCH (this3)-[this8:ACTED_IN]->(this9:Movie) RETURN count(this9) > $param1 AS var10 } WITH * @@ -443,21 +443,21 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this - MATCH (this)-[:\`ACTED_IN\`]->(this0:\`Movie\`) + MATCH (this)-[:ACTED_IN]->(this0:Movie) CALL { WITH this0 - MATCH (this0)<-[this1:\`ACTED_IN\`]-(this2:\`Actor\`) + MATCH (this0)<-[this1:ACTED_IN]-(this2:Actor) RETURN count(this2) = $param0 AS var3 } CALL { WITH this0 - MATCH (this0)<-[this4:\`ACTED_IN\`]-(this5:\`Actor\`) + MATCH (this0)<-[this4:ACTED_IN]-(this5:Actor) CALL { WITH this5 - MATCH (this5)-[this6:\`ACTED_IN\`]->(this7:\`Movie\`) + MATCH (this5)-[this6:ACTED_IN]->(this7:Movie) RETURN count(this7) > $param1 AS var8 } WITH * @@ -466,10 +466,10 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { } CALL { WITH this0 - MATCH (this0)<-[this4:\`ACTED_IN\`]-(this5:\`Actor\`) + MATCH (this0)<-[this4:ACTED_IN]-(this5:Actor) CALL { WITH this5 - MATCH (this5)-[this10:\`ACTED_IN\`]->(this11:\`Movie\`) + MATCH (this5)-[this10:ACTED_IN]->(this11:Movie) RETURN count(this11) > $param2 AS var12 } WITH * @@ -525,19 +525,19 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) CALL { WITH this1 - MATCH (this1)-[this2:\`ACTED_IN\`]->(this3:\`Movie\`) + MATCH (this1)-[this2:ACTED_IN]->(this3:Movie) CALL { WITH this3 - MATCH (this3)<-[this4:\`ACTED_IN\`]-(this5:\`Actor\`) + MATCH (this3)<-[this4:ACTED_IN]-(this5:Actor) CALL { WITH this5 - MATCH (this5)-[this6:\`ACTED_IN\`]->(this7:\`Movie\`) + MATCH (this5)-[this6:ACTED_IN]->(this7:Movie) RETURN count(this7) > $param0 AS var8 } WITH * @@ -546,10 +546,10 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { } CALL { WITH this3 - MATCH (this3)<-[this4:\`ACTED_IN\`]-(this5:\`Actor\`) + MATCH (this3)<-[this4:ACTED_IN]-(this5:Actor) CALL { WITH this5 - MATCH (this5)-[this10:\`ACTED_IN\`]->(this11:\`Movie\`) + MATCH (this5)-[this10:ACTED_IN]->(this11:Movie) RETURN count(this11) > $param1 AS var12 } WITH * @@ -610,34 +610,34 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) RETURN avg(size(this1.name)) >= $param0 AS var2 } CALL { WITH this - MATCH (this)<-[this3:\`ACTED_IN\`]-(this4:\`Actor\`) + MATCH (this)<-[this3:ACTED_IN]-(this4:Actor) CALL { WITH this4 - MATCH (this4)-[this5:\`ACTED_IN\`]->(this6:\`Movie\`) + MATCH (this4)-[this5:ACTED_IN]->(this6:Movie) RETURN avg(this6.released) = $param1 AS var7 } CALL { WITH this4 - MATCH (this4)-[this8:\`ACTED_IN\`]->(this9:\`Movie\`) + MATCH (this4)-[this8:ACTED_IN]->(this9:Movie) CALL { WITH this9 - MATCH (this9)<-[this10:\`ACTED_IN\`]-(this11:\`Actor\`) + MATCH (this9)<-[this10:ACTED_IN]-(this11:Actor) RETURN avg(size(this11.name)) < $param2 AS var12 } CALL { WITH this9 - MATCH (this9)<-[this13:\`ACTED_IN\`]-(this14:\`Actor\`) + MATCH (this9)<-[this13:ACTED_IN]-(this14:Actor) CALL { WITH this14 - MATCH (this14)-[this15:\`ACTED_IN\`]->(this16:\`Movie\`) + MATCH (this14)-[this15:ACTED_IN]->(this16:Movie) RETURN count(this16) > $param3 AS var17 } WITH * @@ -646,10 +646,10 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { } CALL { WITH this9 - MATCH (this9)<-[this13:\`ACTED_IN\`]-(this14:\`Actor\`) + MATCH (this9)<-[this13:ACTED_IN]-(this14:Actor) CALL { WITH this14 - MATCH (this14)-[this19:\`ACTED_IN\`]->(this20:\`Movie\`) + MATCH (this14)-[this19:ACTED_IN]->(this20:Movie) RETURN count(this20) > $param4 AS var21 } WITH * @@ -700,16 +700,16 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this - MATCH (this)-[:\`ACTED_IN\`]->(this0:\`Movie\`) + MATCH (this)-[:ACTED_IN]->(this0:Movie) CALL { WITH this0 - MATCH (this0)<-[this1:\`ACTED_IN\`]-(this2:\`Actor\`) + MATCH (this0)<-[this1:ACTED_IN]-(this2:Actor) CALL { WITH this2 - MATCH (this2)-[this3:\`ACTED_IN\`]->(this4:\`Movie\`) + MATCH (this2)-[this3:ACTED_IN]->(this4:Movie) RETURN count(this4) > $param0 AS var5 } WITH * @@ -718,10 +718,10 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { } CALL { WITH this0 - MATCH (this0)<-[this1:\`ACTED_IN\`]-(this2:\`Actor\`) + MATCH (this0)<-[this1:ACTED_IN]-(this2:Actor) CALL { WITH this2 - MATCH (this2)-[this7:\`ACTED_IN\`]->(this8:\`Movie\`) + MATCH (this2)-[this7:ACTED_IN]->(this8:Movie) RETURN count(this8) > $param1 AS var9 } WITH * @@ -765,16 +765,16 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this - MATCH (this)-[this0:\`ACTED_IN\`]->(this1:\`Movie\`) + MATCH (this)-[this0:ACTED_IN]->(this1:Movie) CALL { WITH this1 - MATCH (this1)<-[:\`ACTED_IN\`]-(this2:\`Actor\`) + MATCH (this1)<-[:ACTED_IN]-(this2:Actor) CALL { WITH this2 - MATCH (this2)-[this3:\`ACTED_IN\`]->(this4:\`Movie\`) + MATCH (this2)-[this3:ACTED_IN]->(this4:Movie) RETURN count(this4) > $param0 AS var5 } WITH * @@ -783,10 +783,10 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { } CALL { WITH this1 - MATCH (this1)<-[:\`ACTED_IN\`]-(this2:\`Actor\`) + MATCH (this1)<-[:ACTED_IN]-(this2:Actor) CALL { WITH this2 - MATCH (this2)-[this7:\`ACTED_IN\`]->(this8:\`Movie\`) + MATCH (this2)-[this7:ACTED_IN]->(this8:Movie) RETURN count(this8) > $param1 AS var9 } WITH * @@ -836,19 +836,19 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) CALL { WITH this1 - MATCH (this1)-[:\`ACTED_IN\`]->(this2:\`Movie\`) + MATCH (this1)-[:ACTED_IN]->(this2:Movie) CALL { WITH this2 - MATCH (this2)<-[this3:\`ACTED_IN\`]-(this4:\`Actor\`) + MATCH (this2)<-[this3:ACTED_IN]-(this4:Actor) CALL { WITH this4 - MATCH (this4)-[this5:\`ACTED_IN\`]->(this6:\`Movie\`) + MATCH (this4)-[this5:ACTED_IN]->(this6:Movie) RETURN count(this6) > $param0 AS var7 } WITH * @@ -897,21 +897,21 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this - MATCH (this)-[:\`ACTED_IN\`]->(this0:\`Movie\`) + MATCH (this)-[:ACTED_IN]->(this0:Movie) CALL { WITH this0 - MATCH (this0)<-[this1:\`ACTED_IN\`]-(this2:\`Actor\`) + MATCH (this0)<-[this1:ACTED_IN]-(this2:Actor) RETURN avg(this1.screenTime) <= $param0 AS var3 } CALL { WITH this0 - MATCH (this0)<-[:\`ACTED_IN\`]-(this4:\`Actor\`) + MATCH (this0)<-[:ACTED_IN]-(this4:Actor) CALL { WITH this4 - MATCH (this4)-[this5:\`ACTED_IN\`]->(this6:\`Movie\`) + MATCH (this4)-[this5:ACTED_IN]->(this6:Movie) RETURN avg(this5.screenTime) <= $param1 AS var7 } WITH * @@ -959,16 +959,16 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this - MATCH (this)-[this0:\`ACTED_IN\`]->(this1:\`Movie\`) + MATCH (this)-[this0:ACTED_IN]->(this1:Movie) CALL { WITH this1 - MATCH (this1)<-[this2:\`ACTED_IN\`]-(this3:\`Actor\`) + MATCH (this1)<-[this2:ACTED_IN]-(this3:Actor) CALL { WITH this3 - MATCH (this3)-[this4:\`ACTED_IN\`]->(this5:\`Movie\`) + MATCH (this3)-[this4:ACTED_IN]->(this5:Movie) RETURN count(this5) > $param0 AS var6 } WITH * @@ -1019,16 +1019,16 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this - MATCH (this)-[this0:\`ACTED_IN\`]->(this1:\`Movie\`) + MATCH (this)-[this0:ACTED_IN]->(this1:Movie) CALL { WITH this1 - MATCH (this1)<-[this2:\`ACTED_IN\`]-(this3:\`Actor\`) + MATCH (this1)<-[this2:ACTED_IN]-(this3:Actor) CALL { WITH this3 - MATCH (this3)-[this4:\`ACTED_IN\`]->(this5:\`Movie\`) + MATCH (this3)-[this4:ACTED_IN]->(this5:Movie) RETURN count(this5) > $param0 AS var6 } WITH * @@ -1068,16 +1068,16 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this - MATCH (this)-[:\`ACTED_IN\`]->(this0:\`Movie\`) + MATCH (this)-[:ACTED_IN]->(this0:Movie) CALL { WITH this0 - MATCH (this0)<-[:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this0)<-[:ACTED_IN]-(this1:Actor) CALL { WITH this1 - MATCH (this1)-[this2:\`ACTED_IN\`]->(this3:\`Movie\`) + MATCH (this1)-[this2:ACTED_IN]->(this3:Movie) RETURN count(this3) > $param0 AS var4 } WITH * @@ -1090,13 +1090,13 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { } CALL { WITH this - MATCH (this)-[:\`ACTED_IN\`]->(this0:\`Movie\`) + MATCH (this)-[:ACTED_IN]->(this0:Movie) CALL { WITH this0 - MATCH (this0)<-[:\`ACTED_IN\`]-(this7:\`Actor\`) + MATCH (this0)<-[:ACTED_IN]-(this7:Actor) CALL { WITH this7 - MATCH (this7)-[this8:\`ACTED_IN\`]->(this9:\`Movie\`) + MATCH (this7)-[this8:ACTED_IN]->(this9:Movie) RETURN count(this9) > $param2 AS var10 } WITH * @@ -1146,16 +1146,16 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this - MATCH (this)-[:\`ACTED_IN\`]->(this0:\`Movie\`) + MATCH (this)-[:ACTED_IN]->(this0:Movie) CALL { WITH this0 - MATCH (this0)<-[:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this0)<-[:ACTED_IN]-(this1:Actor) CALL { WITH this1 - MATCH (this1)-[this2:\`ACTED_IN\`]->(this3:\`Movie\`) + MATCH (this1)-[this2:ACTED_IN]->(this3:Movie) RETURN count(this3) > $param0 AS var4 } WITH * @@ -1168,13 +1168,13 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { } CALL { WITH this - MATCH (this)-[:\`ACTED_IN\`]->(this0:\`Movie\`) + MATCH (this)-[:ACTED_IN]->(this0:Movie) CALL { WITH this0 - MATCH (this0)<-[:\`ACTED_IN\`]-(this7:\`Actor\`) + MATCH (this0)<-[:ACTED_IN]-(this7:Actor) CALL { WITH this7 - MATCH (this7)-[this8:\`ACTED_IN\`]->(this9:\`Movie\`) + MATCH (this7)-[this8:ACTED_IN]->(this9:Movie) RETURN count(this9) > $param2 AS var10 } WITH * @@ -1224,16 +1224,16 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this - MATCH (this)-[:\`ACTED_IN\`]->(this0:\`Movie\`) + MATCH (this)-[:ACTED_IN]->(this0:Movie) CALL { WITH this0 - MATCH (this0)<-[:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this0)<-[:ACTED_IN]-(this1:Actor) CALL { WITH this1 - MATCH (this1)-[this2:\`ACTED_IN\`]->(this3:\`Movie\`) + MATCH (this1)-[this2:ACTED_IN]->(this3:Movie) RETURN count(this3) > $param0 AS var4 } WITH * @@ -1246,13 +1246,13 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { } CALL { WITH this - MATCH (this)-[:\`ACTED_IN\`]->(this0:\`Movie\`) + MATCH (this)-[:ACTED_IN]->(this0:Movie) CALL { WITH this0 - MATCH (this0)<-[:\`ACTED_IN\`]-(this7:\`Actor\`) + MATCH (this0)<-[:ACTED_IN]-(this7:Actor) CALL { WITH this7 - MATCH (this7)-[this8:\`ACTED_IN\`]->(this9:\`Movie\`) + MATCH (this7)-[this8:ACTED_IN]->(this9:Movie) RETURN count(this9) > $param2 AS var10 } WITH * @@ -1311,16 +1311,16 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this - MATCH (this)-[this0:\`ACTED_IN\`]->(this1:\`Movie\`) + MATCH (this)-[this0:ACTED_IN]->(this1:Movie) CALL { WITH this1 - MATCH (this1)<-[this2:\`ACTED_IN\`]-(this3:\`Actor\`) + MATCH (this1)<-[this2:ACTED_IN]-(this3:Actor) CALL { WITH this3 - MATCH (this3)-[this4:\`ACTED_IN\`]->(this5:\`Movie\`) + MATCH (this3)-[this4:ACTED_IN]->(this5:Movie) RETURN count(this5) > $param0 AS var6 } WITH * @@ -1374,16 +1374,16 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this - MATCH (this)-[this0:\`ACTED_IN\`]->(this1:\`Movie\`) + MATCH (this)-[this0:ACTED_IN]->(this1:Movie) CALL { WITH this1 - MATCH (this1)<-[this2:\`ACTED_IN\`]-(this3:\`Actor\`) + MATCH (this1)<-[this2:ACTED_IN]-(this3:Actor) CALL { WITH this3 - MATCH (this3)-[this4:\`ACTED_IN\`]->(this5:\`Movie\`) + MATCH (this3)-[this4:ACTED_IN]->(this5:Movie) RETURN count(this5) > $param0 AS var6 } WITH * diff --git a/packages/graphql/tests/tck/issues/2812.test.ts b/packages/graphql/tests/tck/issues/2812.test.ts index 07f61394c4..0172e47215 100644 --- a/packages/graphql/tests/tck/issues/2812.test.ts +++ b/packages/graphql/tests/tck/issues/2812.test.ts @@ -83,7 +83,7 @@ describe("https://github.com/neo4j/graphql/issues/2812", () => { "UNWIND $create_param3 AS create_var4 CALL { WITH create_var4 - CREATE (create_this0:\`Movie\`) + CREATE (create_this0:Movie) SET create_this0.id = create_var4.id WITH create_this0, create_var4 @@ -91,14 +91,14 @@ describe("https://github.com/neo4j/graphql/issues/2812", () => { WITH create_this0, create_var4 UNWIND create_var4.actors.create AS create_var5 WITH create_var5.node AS create_var6, create_var5.edge AS create_var7, create_this0 - CREATE (create_this8:\`Actor\`) + CREATE (create_this8:Actor) SET create_this8.name = create_var6.name, create_this8.nodeCreatedBy = create_var6.nodeCreatedBy, create_this8.fieldA = create_var6.fieldA, create_this8.fieldB = create_var6.fieldB, create_this8.id = randomUUID() - MERGE (create_this0)<-[create_this9:\`ACTED_IN\`]-(create_this8) + MERGE (create_this0)<-[create_this9:ACTED_IN]-(create_this8) WITH * WHERE (apoc.util.validatePredicate((create_var6.fieldA IS NOT NULL AND NOT ($isAuthenticated = true AND $create_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate((create_var6.fieldB IS NOT NULL AND NOT ($isAuthenticated = true AND $create_param5 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN collect(NULL) AS create_var10 @@ -109,7 +109,7 @@ describe("https://github.com/neo4j/graphql/issues/2812", () => { } CALL { WITH create_this0 - MATCH (create_this0)<-[create_this1:\`ACTED_IN\`]-(create_this2:\`Actor\`) + MATCH (create_this0)<-[create_this1:ACTED_IN]-(create_this2:Actor) WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND create_this2.nodeCreatedBy = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH create_this2 { .name } AS create_this2 RETURN collect(create_this2) AS create_var3 @@ -196,7 +196,7 @@ describe("https://github.com/neo4j/graphql/issues/2812", () => { "UNWIND $create_param3 AS create_var4 CALL { WITH create_var4 - CREATE (create_this0:\`Movie\`) + CREATE (create_this0:Movie) SET create_this0.id = create_var4.id WITH create_this0, create_var4 @@ -204,14 +204,14 @@ describe("https://github.com/neo4j/graphql/issues/2812", () => { WITH create_this0, create_var4 UNWIND create_var4.actors.create AS create_var5 WITH create_var5.node AS create_var6, create_var5.edge AS create_var7, create_this0 - CREATE (create_this8:\`Actor\`) + CREATE (create_this8:Actor) SET create_this8.name = create_var6.name, create_this8.nodeCreatedBy = create_var6.nodeCreatedBy, create_this8.fieldA = create_var6.fieldA, create_this8.fieldB = create_var6.fieldB, create_this8.id = randomUUID() - MERGE (create_this0)<-[create_this9:\`ACTED_IN\`]-(create_this8) + MERGE (create_this0)<-[create_this9:ACTED_IN]-(create_this8) WITH * WHERE (apoc.util.validatePredicate((create_var6.fieldA IS NOT NULL AND NOT ($isAuthenticated = true AND $create_param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate((create_var6.fieldB IS NOT NULL AND NOT ($isAuthenticated = true AND $create_param5 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN collect(NULL) AS create_var10 @@ -222,7 +222,7 @@ describe("https://github.com/neo4j/graphql/issues/2812", () => { } CALL { WITH create_this0 - MATCH (create_this0)<-[create_this1:\`ACTED_IN\`]-(create_this2:\`Actor\`) + MATCH (create_this0)<-[create_this1:ACTED_IN]-(create_this2:Actor) WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND create_this2.nodeCreatedBy = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH create_this2 { .name } AS create_this2 RETURN collect(create_this2) AS create_var3 @@ -307,7 +307,7 @@ describe("https://github.com/neo4j/graphql/issues/2812", () => { "UNWIND $create_param3 AS create_var4 CALL { WITH create_var4 - CREATE (create_this0:\`Movie\`) + CREATE (create_this0:Movie) SET create_this0.id = create_var4.id WITH create_this0, create_var4 @@ -315,12 +315,12 @@ describe("https://github.com/neo4j/graphql/issues/2812", () => { WITH create_this0, create_var4 UNWIND create_var4.actors.create AS create_var5 WITH create_var5.node AS create_var6, create_var5.edge AS create_var7, create_this0 - CREATE (create_this8:\`Actor\`) + CREATE (create_this8:Actor) SET create_this8.name = create_var6.name, create_this8.nodeCreatedBy = create_var6.nodeCreatedBy, create_this8.id = randomUUID() - MERGE (create_this0)<-[create_this9:\`ACTED_IN\`]-(create_this8) + MERGE (create_this0)<-[create_this9:ACTED_IN]-(create_this8) RETURN collect(NULL) AS create_var10 } WITH * @@ -329,7 +329,7 @@ describe("https://github.com/neo4j/graphql/issues/2812", () => { } CALL { WITH create_this0 - MATCH (create_this0)<-[create_this1:\`ACTED_IN\`]-(create_this2:\`Actor\`) + MATCH (create_this0)<-[create_this1:ACTED_IN]-(create_this2:Actor) WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND create_this2.nodeCreatedBy = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH create_this2 { .name } AS create_this2 RETURN collect(create_this2) AS create_var3 diff --git a/packages/graphql/tests/tck/issues/2871.test.ts b/packages/graphql/tests/tck/issues/2871.test.ts index 83e4ade834..65dd04e494 100644 --- a/packages/graphql/tests/tck/issues/2871.test.ts +++ b/packages/graphql/tests/tck/issues/2871.test.ts @@ -62,12 +62,12 @@ describe("https://github.com/neo4j/graphql/issues/2871", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`FirstLevel\`) - OPTIONAL MATCH (this)-[:\`HAS_SECOND_LEVEL\`]->(this0:\`SecondLevel\`) + "MATCH (this:FirstLevel) + OPTIONAL MATCH (this)-[:HAS_SECOND_LEVEL]->(this0:SecondLevel) WITH *, count(this0) AS secondLevelCount WITH * WHERE (secondLevelCount <> 0 AND EXISTS { - MATCH (this0)-[:\`HAS_THIRD_LEVEL\`]->(this1:\`ThirdLevel\`) + MATCH (this0)-[:HAS_THIRD_LEVEL]->(this1:ThirdLevel) WHERE this1.id = $param0 }) RETURN this { .id, createdAt: apoc.date.convertFormat(toString(this.createdAt), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } AS this" @@ -93,15 +93,15 @@ describe("https://github.com/neo4j/graphql/issues/2871", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`FirstLevel\`) - OPTIONAL MATCH (this)-[:\`HAS_SECOND_LEVEL\`]->(this0:\`SecondLevel\`) + "MATCH (this:FirstLevel) + OPTIONAL MATCH (this)-[:HAS_SECOND_LEVEL]->(this0:SecondLevel) WITH *, count(this0) AS secondLevelCount WITH * WHERE (secondLevelCount <> 0 AND (EXISTS { - MATCH (this0)-[:\`HAS_THIRD_LEVEL\`]->(this1:\`ThirdLevel\`) + MATCH (this0)-[:HAS_THIRD_LEVEL]->(this1:ThirdLevel) WHERE this1.id = $param0 } AND NOT (EXISTS { - MATCH (this0)-[:\`HAS_THIRD_LEVEL\`]->(this1:\`ThirdLevel\`) + MATCH (this0)-[:HAS_THIRD_LEVEL]->(this1:ThirdLevel) WHERE NOT (this1.id = $param0) }))) RETURN this { .id, createdAt: apoc.date.convertFormat(toString(this.createdAt), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } AS this" @@ -127,12 +127,12 @@ describe("https://github.com/neo4j/graphql/issues/2871", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`FirstLevel\`) - OPTIONAL MATCH (this)-[:\`HAS_SECOND_LEVEL\`]->(this0:\`SecondLevel\`) + "MATCH (this:FirstLevel) + OPTIONAL MATCH (this)-[:HAS_SECOND_LEVEL]->(this0:SecondLevel) WITH *, count(this0) AS secondLevelCount WITH * WHERE (secondLevelCount <> 0 AND NOT (EXISTS { - MATCH (this0)-[:\`HAS_THIRD_LEVEL\`]->(this1:\`ThirdLevel\`) + MATCH (this0)-[:HAS_THIRD_LEVEL]->(this1:ThirdLevel) WHERE this1.id = $param0 })) RETURN this { .id, createdAt: apoc.date.convertFormat(toString(this.createdAt), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } AS this" diff --git a/packages/graphql/tests/tck/issues/288.test.ts b/packages/graphql/tests/tck/issues/288.test.ts index 0bc9cb6fd9..95faffa65b 100644 --- a/packages/graphql/tests/tck/issues/288.test.ts +++ b/packages/graphql/tests/tck/issues/288.test.ts @@ -62,7 +62,7 @@ describe("#288", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`USER\`) + CREATE (create_this1:USER) SET create_this1.USERID = create_var0.USERID, create_this1.COMPANYID = create_var0.COMPANYID @@ -99,7 +99,7 @@ describe("#288", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`USER\`) + "MATCH (this:USER) WHERE this.USERID = $param0 SET this.COMPANYID = $this_update_COMPANYID RETURN collect(DISTINCT this { .USERID, .COMPANYID }) AS data" diff --git a/packages/graphql/tests/tck/issues/2925.test.ts b/packages/graphql/tests/tck/issues/2925.test.ts index 1f80ba39b4..0903bcd4d0 100644 --- a/packages/graphql/tests/tck/issues/2925.test.ts +++ b/packages/graphql/tests/tck/issues/2925.test.ts @@ -56,8 +56,8 @@ describe("https://github.com/neo4j/graphql/issues/2925", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) - WHERE single(this0 IN [(this)-[:\`HAS_GROUP\`]->(this0:\`Group\`) WHERE this0.name IN $param0 | 1] WHERE true) + "MATCH (this:User) + WHERE single(this0 IN [(this)-[:HAS_GROUP]->(this0:Group) WHERE this0.name IN $param0 | 1] WHERE true) RETURN this { .name } AS this" `); @@ -82,8 +82,8 @@ describe("https://github.com/neo4j/graphql/issues/2925", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) - OPTIONAL MATCH (this)-[:\`HAS_REQUIRED_GROUP\`]->(this0:\`Group\`) + "MATCH (this:User) + OPTIONAL MATCH (this)-[:HAS_REQUIRED_GROUP]->(this0:Group) WITH *, count(this0) AS hasRequiredGroupCount WITH * WHERE (hasRequiredGroupCount <> 0 AND this0.name IN $param0) @@ -111,10 +111,10 @@ describe("https://github.com/neo4j/graphql/issues/2925", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Group\`) + "MATCH (this:Group) WHERE EXISTS { - MATCH (this)<-[:\`HAS_GROUP\`]-(this0:\`User\`) - WHERE single(this1 IN [(this0)-[:\`HAS_GROUP\`]->(this1:\`Group\`) WHERE this1.name IN $param0 | 1] WHERE true) + MATCH (this)<-[:HAS_GROUP]-(this0:User) + WHERE single(this1 IN [(this0)-[:HAS_GROUP]->(this1:Group) WHERE this1.name IN $param0 | 1] WHERE true) } RETURN this { .name } AS this" `); @@ -140,11 +140,11 @@ describe("https://github.com/neo4j/graphql/issues/2925", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Group\`) + "MATCH (this:Group) CALL { WITH this - MATCH (this)<-[:\`HAS_GROUP\`]-(this0:\`User\`) - OPTIONAL MATCH (this0)-[:\`HAS_REQUIRED_GROUP\`]->(this1:\`Group\`) + MATCH (this)<-[:HAS_GROUP]-(this0:User) + OPTIONAL MATCH (this0)-[:HAS_REQUIRED_GROUP]->(this1:Group) WITH *, count(this1) AS hasRequiredGroupCount WITH * WHERE (hasRequiredGroupCount <> 0 AND this1.name IN $param0) diff --git a/packages/graphql/tests/tck/issues/3027.test.ts b/packages/graphql/tests/tck/issues/3027.test.ts index 7dfa4204d5..4890cf3f59 100644 --- a/packages/graphql/tests/tck/issues/3027.test.ts +++ b/packages/graphql/tests/tck/issues/3027.test.ts @@ -83,24 +83,24 @@ describe("https://github.com/neo4j/graphql/issues/3027", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Book\`) + "MATCH (this:Book) WHERE this.isbn = $param0 - CALL apoc.util.validate(EXISTS((this)<-[:\`TRANSLATED_BOOK_TITLE\`]-(:BookTitle_SV)),'Relationship field \\"%s.%s\\" cannot have more than one node linked',[\\"Book\\",\\"translatedTitle\\"]) - CALL apoc.util.validate(EXISTS((this)<-[:\`TRANSLATED_BOOK_TITLE\`]-(:BookTitle_EN)),'Relationship field \\"%s.%s\\" cannot have more than one node linked',[\\"Book\\",\\"translatedTitle\\"]) + CALL apoc.util.validate(EXISTS((this)<-[:TRANSLATED_BOOK_TITLE]-(:BookTitle_SV)),'Relationship field \\"%s.%s\\" cannot have more than one node linked',[\\"Book\\",\\"translatedTitle\\"]) + CALL apoc.util.validate(EXISTS((this)<-[:TRANSLATED_BOOK_TITLE]-(:BookTitle_EN)),'Relationship field \\"%s.%s\\" cannot have more than one node linked',[\\"Book\\",\\"translatedTitle\\"]) CREATE (this_create_translatedTitle_BookTitle_EN0_node:BookTitle_EN) SET this_create_translatedTitle_BookTitle_EN0_node.value = $this_create_translatedTitle_BookTitle_EN0_node_value - MERGE (this)<-[:\`TRANSLATED_BOOK_TITLE\`]-(this_create_translatedTitle_BookTitle_EN0_node) + MERGE (this)<-[:TRANSLATED_BOOK_TITLE]-(this_create_translatedTitle_BookTitle_EN0_node) WITH * CALL { WITH this CALL { WITH * - MATCH (this)<-[update_this0:\`TRANSLATED_BOOK_TITLE\`]-(update_this1:\`BookTitle_SV\`) + MATCH (this)<-[update_this0:TRANSLATED_BOOK_TITLE]-(update_this1:BookTitle_SV) WITH update_this1 { __resolveType: \\"BookTitle_SV\\", __id: id(this), .value } AS update_this1 RETURN update_this1 AS update_var2 UNION WITH * - MATCH (this)<-[update_this3:\`TRANSLATED_BOOK_TITLE\`]-(update_this4:\`BookTitle_EN\`) + MATCH (this)<-[update_this3:TRANSLATED_BOOK_TITLE]-(update_this4:BookTitle_EN) WITH update_this4 { __resolveType: \\"BookTitle_EN\\", __id: id(this), .value } AS update_this4 RETURN update_this4 AS update_var2 } @@ -174,24 +174,24 @@ describe("https://github.com/neo4j/graphql/issues/3027", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Book\`) + "MATCH (this:Book) WHERE this.isbn = $param0 - CALL apoc.util.validate(EXISTS((this)<-[:\`TRANSLATED_BOOK_TITLE\`]-(:BookTitle_SV)),'Relationship field \\"%s.%s\\" cannot have more than one node linked',[\\"Book\\",\\"translatedTitle\\"]) - CALL apoc.util.validate(EXISTS((this)<-[:\`TRANSLATED_BOOK_TITLE\`]-(:BookTitle_EN)),'Relationship field \\"%s.%s\\" cannot have more than one node linked',[\\"Book\\",\\"translatedTitle\\"]) + CALL apoc.util.validate(EXISTS((this)<-[:TRANSLATED_BOOK_TITLE]-(:BookTitle_SV)),'Relationship field \\"%s.%s\\" cannot have more than one node linked',[\\"Book\\",\\"translatedTitle\\"]) + CALL apoc.util.validate(EXISTS((this)<-[:TRANSLATED_BOOK_TITLE]-(:BookTitle_EN)),'Relationship field \\"%s.%s\\" cannot have more than one node linked',[\\"Book\\",\\"translatedTitle\\"]) CREATE (this_create_translatedTitle_BookTitle_EN0_node_BookTitle_EN:BookTitle_EN) SET this_create_translatedTitle_BookTitle_EN0_node_BookTitle_EN.value = $this_create_translatedTitle_BookTitle_EN0_node_BookTitle_EN_value - MERGE (this)<-[:\`TRANSLATED_BOOK_TITLE\`]-(this_create_translatedTitle_BookTitle_EN0_node_BookTitle_EN) + MERGE (this)<-[:TRANSLATED_BOOK_TITLE]-(this_create_translatedTitle_BookTitle_EN0_node_BookTitle_EN) WITH * CALL { WITH this CALL { WITH * - MATCH (this)<-[update_this0:\`TRANSLATED_BOOK_TITLE\`]-(update_this1:\`BookTitle_SV\`) + MATCH (this)<-[update_this0:TRANSLATED_BOOK_TITLE]-(update_this1:BookTitle_SV) WITH update_this1 { __resolveType: \\"BookTitle_SV\\", __id: id(this), .value } AS update_this1 RETURN update_this1 AS update_var2 UNION WITH * - MATCH (this)<-[update_this3:\`TRANSLATED_BOOK_TITLE\`]-(update_this4:\`BookTitle_EN\`) + MATCH (this)<-[update_this3:TRANSLATED_BOOK_TITLE]-(update_this4:BookTitle_EN) WITH update_this4 { __resolveType: \\"BookTitle_EN\\", __id: id(this) } AS update_this4 RETURN update_this4 AS update_var2 } diff --git a/packages/graphql/tests/tck/issues/3215.test.ts b/packages/graphql/tests/tck/issues/3215.test.ts index dfe7e7715a..0747dff3a8 100644 --- a/packages/graphql/tests/tck/issues/3215.test.ts +++ b/packages/graphql/tests/tck/issues/3215.test.ts @@ -51,7 +51,7 @@ describe("https://github.com/neo4j/graphql/issues/3215", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WHERE this.age > $param0 RETURN this { .name, .age } AS this" `); @@ -79,7 +79,7 @@ describe("https://github.com/neo4j/graphql/issues/3215", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WHERE this.age > $param0 RETURN this { .name, .age } AS this" `); diff --git a/packages/graphql/tests/tck/issues/324.test.ts b/packages/graphql/tests/tck/issues/324.test.ts index da073e560b..b1793f191e 100644 --- a/packages/graphql/tests/tck/issues/324.test.ts +++ b/packages/graphql/tests/tck/issues/324.test.ts @@ -89,16 +89,16 @@ describe("#324", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Person\`) + "MATCH (this:Person) WHERE this.identifier = $param0 WITH this CALL { WITH this - MATCH (this)-[this_car0_relationship:\`CAR\`]->(this_car0:Car) + MATCH (this)-[this_car0_relationship:CAR]->(this_car0:Car) WITH this, this_car0 CALL { WITH this, this_car0 - MATCH (this_car0)-[this_car0_manufacturer0_relationship:\`MANUFACTURER\`]->(this_car0_manufacturer0:Manufacturer) + MATCH (this_car0)-[this_car0_manufacturer0_relationship:MANUFACTURER]->(this_car0_manufacturer0:Manufacturer) SET this_car0_manufacturer0.name = $this_update_car0_manufacturer0_name WITH this, this_car0, this_car0_manufacturer0 CALL { @@ -112,7 +112,7 @@ describe("#324", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this_car0_manufacturer0 UNWIND connectedNodes as this_car0_manufacturer0_logo0_connect0_node - MERGE (this_car0_manufacturer0)-[:\`LOGO\`]->(this_car0_manufacturer0_logo0_connect0_node) + MERGE (this_car0_manufacturer0)-[:LOGO]->(this_car0_manufacturer0_logo0_connect0_node) } } WITH this, this_car0, this_car0_manufacturer0, this_car0_manufacturer0_logo0_connect0_node @@ -121,7 +121,7 @@ describe("#324", () => { WITH this, this_car0, this_car0_manufacturer0 CALL { WITH this_car0_manufacturer0 - MATCH (this_car0_manufacturer0)-[this_car0_manufacturer0_logo_Logo_unique:\`LOGO\`]->(:Logo) + MATCH (this_car0_manufacturer0)-[this_car0_manufacturer0_logo_Logo_unique:LOGO]->(:Logo) WITH count(this_car0_manufacturer0_logo_Logo_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDManufacturer.logo required exactly once', [0]) RETURN c AS this_car0_manufacturer0_logo_Logo_unique_ignored @@ -131,7 +131,7 @@ describe("#324", () => { WITH this, this_car0 CALL { WITH this_car0 - MATCH (this_car0)-[this_car0_manufacturer_Manufacturer_unique:\`MANUFACTURER\`]->(:Manufacturer) + MATCH (this_car0)-[this_car0_manufacturer_Manufacturer_unique:MANUFACTURER]->(:Manufacturer) WITH count(this_car0_manufacturer_Manufacturer_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDCar.manufacturer required exactly once', [0]) RETURN c AS this_car0_manufacturer_Manufacturer_unique_ignored @@ -141,7 +141,7 @@ describe("#324", () => { WITH * CALL { WITH this - MATCH (this)-[this_car_Car_unique:\`CAR\`]->(:Car) + MATCH (this)-[this_car_Car_unique:CAR]->(:Car) WITH count(this_car_Car_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDPerson.car required exactly once', [0]) RETURN c AS this_car_Car_unique_ignored diff --git a/packages/graphql/tests/tck/issues/3251.test.ts b/packages/graphql/tests/tck/issues/3251.test.ts index 095d67aa13..71069c1ab1 100644 --- a/packages/graphql/tests/tck/issues/3251.test.ts +++ b/packages/graphql/tests/tck/issues/3251.test.ts @@ -64,7 +64,7 @@ describe("https://github.com/neo4j/graphql/issues/3251", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.name = $param0 SET this.name = $this_update_name WITH this @@ -79,7 +79,7 @@ describe("https://github.com/neo4j/graphql/issues/3251", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_genre0_node - MERGE (this)-[:\`HAS_GENRE\`]->(this_connect_genre0_node) + MERGE (this)-[:HAS_GENRE]->(this_connect_genre0_node) } } WITH this, this_connect_genre0_node @@ -88,14 +88,14 @@ describe("https://github.com/neo4j/graphql/issues/3251", () => { WITH * CALL { WITH this - MATCH (this)-[update_this0:\`HAS_GENRE\`]->(update_this1:\`Genre\`) + MATCH (this)-[update_this0:HAS_GENRE]->(update_this1:Genre) WITH update_this1 { .name } AS update_this1 RETURN head(collect(update_this1)) AS update_var2 } WITH * CALL { WITH this - MATCH (this)-[this_genre_Genre_unique:\`HAS_GENRE\`]->(:Genre) + MATCH (this)-[this_genre_Genre_unique:HAS_GENRE]->(:Genre) WITH count(this_genre_Genre_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.genre required exactly once', [0]) RETURN c AS this_genre_Genre_unique_ignored diff --git a/packages/graphql/tests/tck/issues/3394.test.ts b/packages/graphql/tests/tck/issues/3394.test.ts index 2677a0acd0..f3fbaf0548 100644 --- a/packages/graphql/tests/tck/issues/3394.test.ts +++ b/packages/graphql/tests/tck/issues/3394.test.ts @@ -56,7 +56,7 @@ describe("https://github.com/neo4j/graphql/issues/3394", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Product\`) + "MATCH (this:Product) WITH * ORDER BY this.fg_item DESC RETURN this { id: this.fg_item_id, partNumber: this.fg_item, .description } AS this" @@ -81,10 +81,10 @@ describe("https://github.com/neo4j/graphql/issues/3394", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Employee\`) + "MATCH (this:Employee) CALL { WITH this - MATCH (this)-[this0:\`CAN_ACCESS\`]->(this1:\`Product\`) + MATCH (this)-[this0:CAN_ACCESS]->(this1:Product) WITH this1 { id: this1.fg_item_id, partNumber: this1.fg_item, .description } AS this1 ORDER BY this1.partNumber DESC RETURN collect(this1) AS var2 @@ -113,17 +113,17 @@ describe("https://github.com/neo4j/graphql/issues/3394", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Product\`) - WITH collect(this) AS edges - WITH edges, size(edges) AS totalCount - UNWIND edges AS this - WITH this, totalCount - WITH * - ORDER BY this.fg_item DESC - WITH { node: this { id: this.fg_item_id, partNumber: this.fg_item, .description } } AS edge, totalCount, this - WITH collect(edge) AS edges, totalCount - RETURN { edges: edges, totalCount: totalCount } AS this" - `); + "MATCH (this:Product) + WITH collect(this) AS edges + WITH edges, size(edges) AS totalCount + UNWIND edges AS this + WITH this, totalCount + WITH * + ORDER BY this.fg_item DESC + WITH { node: this { id: this.fg_item_id, partNumber: this.fg_item, .description } } AS edge, totalCount, this + WITH collect(edge) AS edges, totalCount + RETURN { edges: edges, totalCount: totalCount } AS this" + `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); }); @@ -148,10 +148,10 @@ describe("https://github.com/neo4j/graphql/issues/3394", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Employee\`) + "MATCH (this:Employee) CALL { WITH this - MATCH (this)-[this0:\`CAN_ACCESS\`]->(this1:\`Product\`) + MATCH (this)-[this0:CAN_ACCESS]->(this1:Product) WITH this0, this1 ORDER BY this1.partNumber DESC WITH { node: { id: this1.fg_item_id, partNumber: this1.fg_item, description: this1.description } } AS edge diff --git a/packages/graphql/tests/tck/issues/360.test.ts b/packages/graphql/tests/tck/issues/360.test.ts index c04f995c90..4bf7ac9aa0 100644 --- a/packages/graphql/tests/tck/issues/360.test.ts +++ b/packages/graphql/tests/tck/issues/360.test.ts @@ -59,7 +59,7 @@ describe("#360", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Event\`) + "MATCH (this:Event) WHERE (this.start >= $param0 AND this.start <= $param1) RETURN this { start: apoc.date.convertFormat(toString(this.start), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\"), .activity } AS this" `); @@ -105,7 +105,7 @@ describe("#360", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Event\`) + "MATCH (this:Event) WHERE (this.start >= $param0 OR this.start <= $param1) RETURN this { start: apoc.date.convertFormat(toString(this.start), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\"), .activity } AS this" `); diff --git a/packages/graphql/tests/tck/issues/387.test.ts b/packages/graphql/tests/tck/issues/387.test.ts index ebb701f42f..d3495a2dc2 100644 --- a/packages/graphql/tests/tck/issues/387.test.ts +++ b/packages/graphql/tests/tck/issues/387.test.ts @@ -83,7 +83,7 @@ describe("#387", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Place\`) + "MATCH (this:Place) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/issues/402.test.ts b/packages/graphql/tests/tck/issues/402.test.ts index 92f52d74d5..71604e4c63 100644 --- a/packages/graphql/tests/tck/issues/402.test.ts +++ b/packages/graphql/tests/tck/issues/402.test.ts @@ -58,10 +58,10 @@ describe("#402", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Event\`) + "MATCH (this:Event) CALL { WITH this - MATCH (this)-[this0:\`HAPPENS_IN\`]->(this1:\`Area\`) + MATCH (this)-[this0:HAPPENS_IN]->(this1:Area) WITH this1 { .id } AS this1 RETURN head(collect(this1)) AS var2 } diff --git a/packages/graphql/tests/tck/issues/433.test.ts b/packages/graphql/tests/tck/issues/433.test.ts index ae187d374a..8944a8950d 100644 --- a/packages/graphql/tests/tck/issues/433.test.ts +++ b/packages/graphql/tests/tck/issues/433.test.ts @@ -63,10 +63,10 @@ describe("#413", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[this0:\`ACTED_IN\`]->(this1:\`Person\`) + MATCH (this)-[this0:ACTED_IN]->(this1:Person) WITH { node: { name: this1.name } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount diff --git a/packages/graphql/tests/tck/issues/488.test.ts b/packages/graphql/tests/tck/issues/488.test.ts index 4eef526e94..774c95b5c9 100644 --- a/packages/graphql/tests/tck/issues/488.test.ts +++ b/packages/graphql/tests/tck/issues/488.test.ts @@ -74,26 +74,26 @@ describe("#488", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Journalist\`) + "MATCH (this:Journalist) WHERE EXISTS { - MATCH (this)-[this0:\`HAS_KEYWORD\`]->(this1:\`Emoji\`) + MATCH (this)-[this0:HAS_KEYWORD]->(this1:Emoji) WHERE this1.type = $param0 } CALL { WITH this CALL { WITH * - MATCH (this)-[this2:\`HAS_KEYWORD\`]->(this3:\`Emoji\`) + MATCH (this)-[this2:HAS_KEYWORD]->(this3:Emoji) WITH this3 { __resolveType: \\"Emoji\\", __id: id(this), .id, .type } AS this3 RETURN this3 AS var4 UNION WITH * - MATCH (this)-[this5:\`HAS_KEYWORD\`]->(this6:\`Hashtag\`) + MATCH (this)-[this5:HAS_KEYWORD]->(this6:Hashtag) WITH this6 { __resolveType: \\"Hashtag\\", __id: id(this) } AS this6 RETURN this6 AS var4 UNION WITH * - MATCH (this)-[this7:\`HAS_KEYWORD\`]->(this8:\`Text\`) + MATCH (this)-[this7:HAS_KEYWORD]->(this8:Text) WITH this8 { __resolveType: \\"Text\\", __id: id(this) } AS this8 RETURN this8 AS var4 } @@ -128,26 +128,26 @@ describe("#488", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Journalist\`) + "MATCH (this:Journalist) WHERE NOT (EXISTS { - MATCH (this)-[this0:\`HAS_KEYWORD\`]->(this1:\`Emoji\`) + MATCH (this)-[this0:HAS_KEYWORD]->(this1:Emoji) WHERE this1.type = $param0 }) CALL { WITH this CALL { WITH * - MATCH (this)-[this2:\`HAS_KEYWORD\`]->(this3:\`Emoji\`) + MATCH (this)-[this2:HAS_KEYWORD]->(this3:Emoji) WITH this3 { __resolveType: \\"Emoji\\", __id: id(this), .id, .type } AS this3 RETURN this3 AS var4 UNION WITH * - MATCH (this)-[this5:\`HAS_KEYWORD\`]->(this6:\`Hashtag\`) + MATCH (this)-[this5:HAS_KEYWORD]->(this6:Hashtag) WITH this6 { __resolveType: \\"Hashtag\\", __id: id(this) } AS this6 RETURN this6 AS var4 UNION WITH * - MATCH (this)-[this7:\`HAS_KEYWORD\`]->(this8:\`Text\`) + MATCH (this)-[this7:HAS_KEYWORD]->(this8:Text) WITH this8 { __resolveType: \\"Text\\", __id: id(this) } AS this8 RETURN this8 AS var4 } diff --git a/packages/graphql/tests/tck/issues/582.test.ts b/packages/graphql/tests/tck/issues/582.test.ts index 9030170f76..61713f4503 100644 --- a/packages/graphql/tests/tck/issues/582.test.ts +++ b/packages/graphql/tests/tck/issues/582.test.ts @@ -72,11 +72,11 @@ describe("#582", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Entity\`) + "MATCH (this:Entity) WHERE (this.type = $param0 AND EXISTS { - MATCH (this)-[this0:\`EDGE\`]->(this1:\`Entity\`) + MATCH (this)-[this0:EDGE]->(this1:Entity) WHERE (this1.type = $param1 AND EXISTS { - MATCH (this1)<-[this2:\`EDGE\`]-(this3:\`Entity\`) + MATCH (this1)<-[this2:EDGE]-(this3:Entity) WHERE this3.type = $param2 }) }) @@ -125,13 +125,13 @@ describe("#582", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Entity\`) + "MATCH (this:Entity) WHERE (this.type = $param0 AND EXISTS { - MATCH (this)-[this0:\`EDGE\`]->(this1:\`Entity\`) + MATCH (this)-[this0:EDGE]->(this1:Entity) WHERE (this1.type = $param1 AND EXISTS { - MATCH (this1)<-[this2:\`EDGE\`]-(this3:\`Entity\`) + MATCH (this1)<-[this2:EDGE]-(this3:Entity) WHERE (this3.type = $param2 AND EXISTS { - MATCH (this3)-[this4:\`EDGE\`]->(this5:\`Entity\`) + MATCH (this3)-[this4:EDGE]->(this5:Entity) WHERE this5.type = $param3 }) }) diff --git a/packages/graphql/tests/tck/issues/583.test.ts b/packages/graphql/tests/tck/issues/583.test.ts index 67d7d1d330..b682e9defb 100644 --- a/packages/graphql/tests/tck/issues/583.test.ts +++ b/packages/graphql/tests/tck/issues/583.test.ts @@ -81,22 +81,22 @@ describe("#583", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this CALL { WITH * - MATCH (this)-[this0:\`ACTED_IN\`]->(this1:\`Movie\`) + MATCH (this)-[this0:ACTED_IN]->(this1:Movie) WITH this1 { __resolveType: \\"Movie\\", __id: id(this), .title, .awardsGiven } AS this1 RETURN this1 AS var2 UNION WITH * - MATCH (this)-[this3:\`ACTED_IN\`]->(this4:\`Series\`) + MATCH (this)-[this3:ACTED_IN]->(this4:Series) WITH this4 { __resolveType: \\"Series\\", __id: id(this), .title, .awardsGiven } AS this4 RETURN this4 AS var2 UNION WITH * - MATCH (this)-[this5:\`ACTED_IN\`]->(this6:\`ShortFilm\`) + MATCH (this)-[this5:ACTED_IN]->(this6:ShortFilm) WITH this6 { __resolveType: \\"ShortFilm\\", __id: id(this), .title } AS this6 RETURN this6 AS var2 } diff --git a/packages/graphql/tests/tck/issues/601.test.ts b/packages/graphql/tests/tck/issues/601.test.ts index 477706183e..318e87edf1 100644 --- a/packages/graphql/tests/tck/issues/601.test.ts +++ b/packages/graphql/tests/tck/issues/601.test.ts @@ -93,16 +93,16 @@ describe("#601", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Stakeholder\`) + "MATCH (this:Stakeholder) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $param1 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { WITH this - MATCH (this)-[this0:\`REQUIRES\`]->(this1:\`Document\`) + MATCH (this)-[this0:REQUIRES]->(this1:Document) WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $param3 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { WITH this1 - MATCH (this1:\`Document\`)<-[this2:\`UPLOADED\`]-(this3:\`CustomerContact\`) + MATCH (this1:Document)<-[this2:UPLOADED]-(this3:CustomerContact) WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $param4 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH { fileId: this2.fileId, uploadedAt: apoc.date.convertFormat(toString(this2.uploadedAt), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } AS edge WITH collect(edge) AS edges diff --git a/packages/graphql/tests/tck/issues/630.test.ts b/packages/graphql/tests/tck/issues/630.test.ts index 41d7f1f94d..c1e9224624 100644 --- a/packages/graphql/tests/tck/issues/630.test.ts +++ b/packages/graphql/tests/tck/issues/630.test.ts @@ -68,7 +68,7 @@ describe("Cypher directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this CALL { @@ -80,7 +80,7 @@ describe("Cypher directive", () => { WITH m AS this0 CALL { WITH this0 - MATCH (this0)<-[this1:\`ACTED_IN\`]-(this2:\`Actor\`) + MATCH (this0)<-[this1:ACTED_IN]-(this2:Actor) WITH { node: { __resolveType: \\"Actor\\", __id: id(this2) } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount diff --git a/packages/graphql/tests/tck/issues/832.test.ts b/packages/graphql/tests/tck/issues/832.test.ts index c16fa9eaf3..c160e63239 100644 --- a/packages/graphql/tests/tck/issues/832.test.ts +++ b/packages/graphql/tests/tck/issues/832.test.ts @@ -101,7 +101,7 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_subjects_connect0_node - MERGE (this0)<-[:\`ACTED_IN\`]-(this0_subjects_connect0_node) + MERGE (this0)<-[:ACTED_IN]-(this0_subjects_connect0_node) } } WITH this0, this0_subjects_connect0_node @@ -118,7 +118,7 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_subjects_connect1_node - MERGE (this0)<-[:\`ACTED_IN\`]-(this0_subjects_connect1_node) + MERGE (this0)<-[:ACTED_IN]-(this0_subjects_connect1_node) } } WITH this0, this0_subjects_connect1_node @@ -136,7 +136,7 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_objects_connect0_node - MERGE (this0)-[:\`ACTED_IN\`]->(this0_objects_connect0_node) + MERGE (this0)-[:ACTED_IN]->(this0_objects_connect0_node) } } WITH this0, this0_objects_connect0_node @@ -153,7 +153,7 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_objects_connect1_node - MERGE (this0)-[:\`ACTED_IN\`]->(this0_objects_connect1_node) + MERGE (this0)-[:ACTED_IN]->(this0_objects_connect1_node) } } WITH this0, this0_objects_connect1_node @@ -177,7 +177,7 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this1 UNWIND connectedNodes as this1_subjects_connect0_node - MERGE (this1)<-[:\`ACTED_IN\`]-(this1_subjects_connect0_node) + MERGE (this1)<-[:ACTED_IN]-(this1_subjects_connect0_node) } } WITH this1, this1_subjects_connect0_node @@ -194,7 +194,7 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this1 UNWIND connectedNodes as this1_subjects_connect1_node - MERGE (this1)<-[:\`ACTED_IN\`]-(this1_subjects_connect1_node) + MERGE (this1)<-[:ACTED_IN]-(this1_subjects_connect1_node) } } WITH this1, this1_subjects_connect1_node @@ -212,7 +212,7 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this1 UNWIND connectedNodes as this1_objects_connect0_node - MERGE (this1)-[:\`ACTED_IN\`]->(this1_objects_connect0_node) + MERGE (this1)-[:ACTED_IN]->(this1_objects_connect0_node) } } WITH this1, this1_objects_connect0_node @@ -229,7 +229,7 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this1 UNWIND connectedNodes as this1_objects_connect1_node - MERGE (this1)-[:\`ACTED_IN\`]->(this1_objects_connect1_node) + MERGE (this1)-[:ACTED_IN]->(this1_objects_connect1_node) } } WITH this1, this1_objects_connect1_node @@ -237,7 +237,7 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { } RETURN this1 } - RETURN [ this0 { .id }, this1 { .id } ] AS data" + RETURN [this0 { .id }, this1 { .id }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -318,7 +318,7 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_subjects_connect0_node - MERGE (this0)<-[:\`ACTED_IN\`]-(this0_subjects_connect0_node) + MERGE (this0)<-[:ACTED_IN]-(this0_subjects_connect0_node) } } WITH this0, this0_subjects_connect0_node @@ -335,7 +335,7 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_subjects_connect1_node - MERGE (this0)<-[:\`ACTED_IN\`]-(this0_subjects_connect1_node) + MERGE (this0)<-[:ACTED_IN]-(this0_subjects_connect1_node) } } WITH this0, this0_subjects_connect1_node @@ -353,7 +353,7 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_objects_connect0_node - MERGE (this0)-[:\`ACTED_IN\`]->(this0_objects_connect0_node) + MERGE (this0)-[:ACTED_IN]->(this0_objects_connect0_node) } } WITH this0, this0_objects_connect0_node @@ -370,7 +370,7 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_objects_connect1_node - MERGE (this0)-[:\`ACTED_IN\`]->(this0_objects_connect1_node) + MERGE (this0)-[:ACTED_IN]->(this0_objects_connect1_node) } } WITH this0, this0_objects_connect1_node @@ -378,7 +378,7 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { } RETURN this0 } - RETURN [ this0 { .id } ] AS data" + RETURN [this0 { .id }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -444,7 +444,7 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_subjects_connect0_node - MERGE (this0)<-[:\`ACTED_IN\`]-(this0_subjects_connect0_node) + MERGE (this0)<-[:ACTED_IN]-(this0_subjects_connect0_node) } } WITH this0, this0_subjects_connect0_node @@ -461,7 +461,7 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_subjects_connect1_node - MERGE (this0)<-[:\`ACTED_IN\`]-(this0_subjects_connect1_node) + MERGE (this0)<-[:ACTED_IN]-(this0_subjects_connect1_node) } } WITH this0, this0_subjects_connect1_node @@ -479,7 +479,7 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_objects_connect0_node - MERGE (this0)-[:\`ACTED_IN\`]->(this0_objects_connect0_node) + MERGE (this0)-[:ACTED_IN]->(this0_objects_connect0_node) } } WITH this0, this0_objects_connect0_node @@ -496,7 +496,7 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_objects_connect1_node - MERGE (this0)-[:\`ACTED_IN\`]->(this0_objects_connect1_node) + MERGE (this0)-[:ACTED_IN]->(this0_objects_connect1_node) } } WITH this0, this0_objects_connect1_node @@ -504,7 +504,7 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { } RETURN this0 } - RETURN [ this0 { .id } ] AS data" + RETURN [this0 { .id }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -581,7 +581,7 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_subjects_connect0_node - MERGE (this0)<-[:\`ACTED_IN\`]-(this0_subjects_connect0_node) + MERGE (this0)<-[:ACTED_IN]-(this0_subjects_connect0_node) } } WITH this0, this0_subjects_connect0_node @@ -598,7 +598,7 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_subjects_connect1_node - MERGE (this0)<-[:\`ACTED_IN\`]-(this0_subjects_connect1_node) + MERGE (this0)<-[:ACTED_IN]-(this0_subjects_connect1_node) } } WITH this0, this0_subjects_connect1_node @@ -616,7 +616,7 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_objects_connect0_node - MERGE (this0)-[:\`ACTED_IN\`]->(this0_objects_connect0_node) + MERGE (this0)-[:ACTED_IN]->(this0_objects_connect0_node) } } WITH this0, this0_objects_connect0_node @@ -633,7 +633,7 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_objects_connect1_node - MERGE (this0)-[:\`ACTED_IN\`]->(this0_objects_connect1_node) + MERGE (this0)-[:ACTED_IN]->(this0_objects_connect1_node) } } WITH this0, this0_objects_connect1_node @@ -657,7 +657,7 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this1 UNWIND connectedNodes as this1_subjects_connect0_node - MERGE (this1)<-[:\`ACTED_IN\`]-(this1_subjects_connect0_node) + MERGE (this1)<-[:ACTED_IN]-(this1_subjects_connect0_node) } } WITH this1, this1_subjects_connect0_node @@ -674,7 +674,7 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this1 UNWIND connectedNodes as this1_subjects_connect1_node - MERGE (this1)<-[:\`ACTED_IN\`]-(this1_subjects_connect1_node) + MERGE (this1)<-[:ACTED_IN]-(this1_subjects_connect1_node) } } WITH this1, this1_subjects_connect1_node @@ -692,7 +692,7 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this1 UNWIND connectedNodes as this1_objects_connect0_node - MERGE (this1)-[:\`ACTED_IN\`]->(this1_objects_connect0_node) + MERGE (this1)-[:ACTED_IN]->(this1_objects_connect0_node) } } WITH this1, this1_objects_connect0_node @@ -709,7 +709,7 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this1 UNWIND connectedNodes as this1_objects_connect1_node - MERGE (this1)-[:\`ACTED_IN\`]->(this1_objects_connect1_node) + MERGE (this1)-[:ACTED_IN]->(this1_objects_connect1_node) } } WITH this1, this1_objects_connect1_node @@ -721,12 +721,12 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { WITH this0 CALL { WITH * - MATCH (this0)<-[create_this0:\`ACTED_IN\`]-(create_this1:\`Person\`) + MATCH (this0)<-[create_this0:ACTED_IN]-(create_this1:Person) WITH create_this1 { __resolveType: \\"Person\\", __id: id(this0), .id } AS create_this1 RETURN create_this1 AS create_var2 UNION WITH * - MATCH (this0)<-[create_this3:\`ACTED_IN\`]-(create_this4:\`Place\`) + MATCH (this0)<-[create_this3:ACTED_IN]-(create_this4:Place) WITH create_this4 { __resolveType: \\"Place\\", __id: id(this0), .id } AS create_this4 RETURN create_this4 AS create_var2 } @@ -737,12 +737,12 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { WITH this0 CALL { WITH * - MATCH (this0)-[create_this5:\`ACTED_IN\`]->(create_this6:\`Person\`) + MATCH (this0)-[create_this5:ACTED_IN]->(create_this6:Person) WITH create_this6 { __resolveType: \\"Person\\", __id: id(this0), .id } AS create_this6 RETURN create_this6 AS create_var7 UNION WITH * - MATCH (this0)-[create_this8:\`ACTED_IN\`]->(create_this9:\`Place\`) + MATCH (this0)-[create_this8:ACTED_IN]->(create_this9:Place) WITH create_this9 { __resolveType: \\"Place\\", __id: id(this0), .id } AS create_this9 RETURN create_this9 AS create_var7 } @@ -753,12 +753,12 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { WITH this1 CALL { WITH * - MATCH (this1)<-[create_this10:\`ACTED_IN\`]-(create_this11:\`Person\`) + MATCH (this1)<-[create_this10:ACTED_IN]-(create_this11:Person) WITH create_this11 { __resolveType: \\"Person\\", __id: id(this1), .id } AS create_this11 RETURN create_this11 AS create_var12 UNION WITH * - MATCH (this1)<-[create_this13:\`ACTED_IN\`]-(create_this14:\`Place\`) + MATCH (this1)<-[create_this13:ACTED_IN]-(create_this14:Place) WITH create_this14 { __resolveType: \\"Place\\", __id: id(this1), .id } AS create_this14 RETURN create_this14 AS create_var12 } @@ -769,19 +769,19 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { WITH this1 CALL { WITH * - MATCH (this1)-[create_this15:\`ACTED_IN\`]->(create_this16:\`Person\`) + MATCH (this1)-[create_this15:ACTED_IN]->(create_this16:Person) WITH create_this16 { __resolveType: \\"Person\\", __id: id(this1), .id } AS create_this16 RETURN create_this16 AS create_var17 UNION WITH * - MATCH (this1)-[create_this18:\`ACTED_IN\`]->(create_this19:\`Place\`) + MATCH (this1)-[create_this18:ACTED_IN]->(create_this19:Place) WITH create_this19 { __resolveType: \\"Place\\", __id: id(this1), .id } AS create_this19 RETURN create_this19 AS create_var17 } WITH create_var17 RETURN collect(create_var17) AS create_var17 } - RETURN [ this0 { .id, subjects: create_var2, objects: create_var7 }, this1 { .id, subjects: create_var12, objects: create_var17 } ] AS data" + RETURN [this0 { .id, subjects: create_var2, objects: create_var7 }, this1 { .id, subjects: create_var12, objects: create_var17 }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -859,7 +859,7 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_subjects_connect0_node - MERGE (this0)<-[:\`ACTED_IN\`]-(this0_subjects_connect0_node) + MERGE (this0)<-[:ACTED_IN]-(this0_subjects_connect0_node) } } WITH this0, this0_subjects_connect0_node @@ -876,7 +876,7 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_subjects_connect1_node - MERGE (this0)<-[:\`ACTED_IN\`]-(this0_subjects_connect1_node) + MERGE (this0)<-[:ACTED_IN]-(this0_subjects_connect1_node) } } WITH this0, this0_subjects_connect1_node @@ -890,7 +890,7 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { SET this1.kind = $this1_kind RETURN this1 } - RETURN [ this0 { .id }, this1 { .id } ] AS data" + RETURN [this0 { .id }, this1 { .id }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` diff --git a/packages/graphql/tests/tck/issues/847.test.ts b/packages/graphql/tests/tck/issues/847.test.ts index b3c3aa7f16..d684af4e4f 100644 --- a/packages/graphql/tests/tck/issues/847.test.ts +++ b/packages/graphql/tests/tck/issues/847.test.ts @@ -67,17 +67,17 @@ describe("https://github.com/neo4j/graphql/issues/847", () => { const result = await translateQuery(neoSchema, query, {}); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Interaction\`) + "MATCH (this:Interaction) CALL { WITH this CALL { WITH * - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Person\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Person) WITH this1 { __resolveType: \\"Person\\", __id: id(this), .id } AS this1 RETURN this1 AS var2 UNION WITH * - MATCH (this)<-[this3:\`ACTED_IN\`]-(this4:\`Place\`) + MATCH (this)<-[this3:ACTED_IN]-(this4:Place) WITH this4 { __resolveType: \\"Place\\", __id: id(this), .id } AS this4 RETURN this4 AS var2 } @@ -88,12 +88,12 @@ describe("https://github.com/neo4j/graphql/issues/847", () => { WITH this CALL { WITH * - MATCH (this)-[this5:\`ACTED_IN\`]->(this6:\`Person\`) + MATCH (this)-[this5:ACTED_IN]->(this6:Person) WITH this6 { __resolveType: \\"Person\\", __id: id(this), .id } AS this6 RETURN this6 AS var7 UNION WITH * - MATCH (this)-[this8:\`ACTED_IN\`]->(this9:\`Place\`) + MATCH (this)-[this8:ACTED_IN]->(this9:Place) WITH this9 { __resolveType: \\"Place\\", __id: id(this), .id } AS this9 RETURN this9 AS var7 } diff --git a/packages/graphql/tests/tck/issues/894.test.ts b/packages/graphql/tests/tck/issues/894.test.ts index 744598b73d..df58e8beb8 100644 --- a/packages/graphql/tests/tck/issues/894.test.ts +++ b/packages/graphql/tests/tck/issues/894.test.ts @@ -63,12 +63,12 @@ describe("https://github.com/neo4j/graphql/issues/894", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) WHERE this.name = $param0 WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_disconnect_activeOrganization0_rel:\`ACTIVELY_MANAGING\`]->(this_disconnect_activeOrganization0:Organization) + OPTIONAL MATCH (this)-[this_disconnect_activeOrganization0_rel:ACTIVELY_MANAGING]->(this_disconnect_activeOrganization0:Organization) WHERE NOT (this_disconnect_activeOrganization0._id = $updateUsers_args_disconnect_activeOrganization_where_Organization_this_disconnect_activeOrganization0param0) CALL { WITH this_disconnect_activeOrganization0, this_disconnect_activeOrganization0_rel, this @@ -90,7 +90,7 @@ describe("https://github.com/neo4j/graphql/issues/894", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_activeOrganization0_node - MERGE (this)-[:\`ACTIVELY_MANAGING\`]->(this_connect_activeOrganization0_node) + MERGE (this)-[:ACTIVELY_MANAGING]->(this_connect_activeOrganization0_node) } } WITH this, this_connect_activeOrganization0_node @@ -100,7 +100,7 @@ describe("https://github.com/neo4j/graphql/issues/894", () => { WITH * CALL { WITH this - MATCH (this)-[this_activeOrganization_Organization_unique:\`ACTIVELY_MANAGING\`]->(:Organization) + MATCH (this)-[this_activeOrganization_Organization_unique:ACTIVELY_MANAGING]->(:Organization) WITH count(this_activeOrganization_Organization_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDUser.activeOrganization must be less than or equal to one', [0]) RETURN c AS this_activeOrganization_Organization_unique_ignored diff --git a/packages/graphql/tests/tck/issues/901.test.ts b/packages/graphql/tests/tck/issues/901.test.ts index bc278f1de2..40e656e542 100644 --- a/packages/graphql/tests/tck/issues/901.test.ts +++ b/packages/graphql/tests/tck/issues/901.test.ts @@ -90,17 +90,17 @@ describe("https://github.com/neo4j/graphql/issues/901", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Series\`) - WHERE (single(this1 IN [(this)-[this0:\`HAS_MANUFACTURER\`]->(this1:\`Series\`) WHERE (this0.current = $param0 AND this1.name = $param1) | 1] WHERE true) OR single(this3 IN [(this)-[this2:\`HAS_BRAND\`]->(this3:\`Series\`) WHERE (this2.current = $param2 AND this3.name = $param3) | 1] WHERE true)) + "MATCH (this:Series) + WHERE (single(this1 IN [(this)-[this0:HAS_MANUFACTURER]->(this1:Series) WHERE (this0.current = $param0 AND this1.name = $param1) | 1] WHERE true) OR single(this3 IN [(this)-[this2:HAS_BRAND]->(this3:Series) WHERE (this2.current = $param2 AND this3.name = $param3) | 1] WHERE true)) CALL { WITH this - MATCH (this)-[this4:\`HAS_BRAND\`]->(this5:\`Series\`) + MATCH (this)-[this4:HAS_BRAND]->(this5:Series) WITH this5 { .name } AS this5 RETURN head(collect(this5)) AS var6 } CALL { WITH this - MATCH (this)-[this7:\`HAS_MANUFACTURER\`]->(this8:\`Series\`) + MATCH (this)-[this7:HAS_MANUFACTURER]->(this8:Series) WITH this8 { .name } AS this8 RETURN head(collect(this8)) AS var9 } diff --git a/packages/graphql/tests/tck/issues/988.test.ts b/packages/graphql/tests/tck/issues/988.test.ts index ef1ef30cb2..14a57c4d64 100644 --- a/packages/graphql/tests/tck/issues/988.test.ts +++ b/packages/graphql/tests/tck/issues/988.test.ts @@ -131,20 +131,20 @@ describe("https://github.com/neo4j/graphql/issues/988", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Series\`) + "MATCH (this:Series) WHERE (((EXISTS { - MATCH (this)-[this0:\`MANUFACTURER\`]->(this1:\`Manufacturer\`) + MATCH (this)-[this0:MANUFACTURER]->(this1:Manufacturer) WHERE (this0.current = $param0 AND this1.name = $param1) } OR EXISTS { - MATCH (this)-[this2:\`MANUFACTURER\`]->(this3:\`Manufacturer\`) + MATCH (this)-[this2:MANUFACTURER]->(this3:Manufacturer) WHERE (this2.current = $param2 AND this3.name = $param3) }) AND EXISTS { - MATCH (this)-[this4:\`BRAND\`]->(this5:\`Brand\`) + MATCH (this)-[this4:BRAND]->(this5:Brand) WHERE (this4.current = $param4 AND this5.name = $param5) }) AND this.current = $param6) CALL { WITH this - MATCH (this)-[this6:\`MANUFACTURER\`]->(this7:\`Manufacturer\`) + MATCH (this)-[this6:MANUFACTURER]->(this7:Manufacturer) WITH { current: this6.current, node: { name: this7.name } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount @@ -152,7 +152,7 @@ describe("https://github.com/neo4j/graphql/issues/988", () => { } CALL { WITH this - MATCH (this)-[this9:\`BRAND\`]->(this10:\`Brand\`) + MATCH (this)-[this9:BRAND]->(this10:Brand) WITH { current: this9.current, node: { name: this10.name } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount diff --git a/packages/graphql/tests/tck/math.test.ts b/packages/graphql/tests/tck/math.test.ts index 5d9dea4d53..142c8fd82a 100644 --- a/packages/graphql/tests/tck/math.test.ts +++ b/packages/graphql/tests/tck/math.test.ts @@ -76,7 +76,7 @@ describe("Math operators", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WITH this CALL { WITH this @@ -114,7 +114,7 @@ describe("Math operators", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WITH this CALL { WITH this @@ -150,11 +150,11 @@ describe("Math operators", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WITH this CALL { WITH this - MATCH (this)-[this_acted_in0_relationship:\`ACTED_IN\`]->(this_actedIn0:Movie) + MATCH (this)-[this_acted_in0_relationship:ACTED_IN]->(this_actedIn0:Movie) WITH this_actedIn0, this CALL { WITH this_actedIn0 @@ -169,7 +169,7 @@ describe("Math operators", () => { WITH * CALL { WITH this - MATCH (this)-[update_this0:\`ACTED_IN\`]->(update_this1:\`Movie\`) + MATCH (this)-[update_this0:ACTED_IN]->(update_this1:Movie) WITH update_this1 { .viewers } AS update_this1 RETURN collect(update_this1) AS update_var2 } @@ -208,11 +208,11 @@ describe("Math operators", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WITH this CALL { WITH this - MATCH (this)-[this_acted_in0_relationship:\`ACTED_IN\`]->(this_actedIn0:Movie) + MATCH (this)-[this_acted_in0_relationship:ACTED_IN]->(this_actedIn0:Movie) WITH this_acted_in0_relationship, this CALL { WITH this_acted_in0_relationship @@ -226,13 +226,13 @@ describe("Math operators", () => { WITH * CALL { WITH this - MATCH (this)-[update_this0:\`ACTED_IN\`]->(update_this1:\`Movie\`) + MATCH (this)-[update_this0:ACTED_IN]->(update_this1:Movie) WITH update_this1 { .title } AS update_this1 RETURN collect(update_this1) AS update_var2 } CALL { WITH this - MATCH (this)-[update_this3:\`ACTED_IN\`]->(update_this4:\`Movie\`) + MATCH (this)-[update_this3:ACTED_IN]->(update_this4:Movie) WITH { pay: update_this3.pay } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount @@ -279,14 +279,14 @@ describe("Math operators", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WITH this CALL { WITH this WITH this CALL { WITH this - MATCH (this)-[this_married_with0_relationship:\`MARRIED_WITH\`]->(this_marriedWith0:Star) + MATCH (this)-[this_married_with0_relationship:MARRIED_WITH]->(this_marriedWith0:Star) WITH this_marriedWith0, this CALL { WITH this_marriedWith0 @@ -299,7 +299,7 @@ describe("Math operators", () => { WITH this, this_marriedWith0 CALL { WITH this_marriedWith0 - MATCH (this_marriedWith0)<-[this_marriedWith0_marriedWith_Actor_unique:\`MARRIED_WITH\`]-(:Actor) + MATCH (this_marriedWith0)<-[this_marriedWith0_marriedWith_Actor_unique:MARRIED_WITH]-(:Actor) WITH count(this_marriedWith0_marriedWith_Actor_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDStar.marriedWith must be less than or equal to one', [0]) RETURN c AS this_marriedWith0_marriedWith_Actor_unique_ignored @@ -313,7 +313,7 @@ describe("Math operators", () => { WITH this CALL { WITH * - MATCH (this)-[update_this0:\`MARRIED_WITH\`]->(update_this1:\`Star\`) + MATCH (this)-[update_this0:MARRIED_WITH]->(update_this1:Star) WITH update_this1 { __resolveType: \\"Star\\", __id: id(this), .marriageLength } AS update_this1 RETURN update_this1 AS update_var2 } @@ -352,18 +352,18 @@ describe("Math operators", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WITH this CALL { WITH this WITH this CALL { WITH this - MATCH (this)-[this_married_with0_relationship:\`MARRIED_WITH\`]->(this_marriedWith0:Star) + MATCH (this)-[this_married_with0_relationship:MARRIED_WITH]->(this_marriedWith0:Star) WITH this, this_marriedWith0 CALL { WITH this_marriedWith0 - MATCH (this_marriedWith0)<-[this_marriedWith0_marriedWith_Actor_unique:\`MARRIED_WITH\`]-(:Actor) + MATCH (this_marriedWith0)<-[this_marriedWith0_marriedWith_Actor_unique:MARRIED_WITH]-(:Actor) WITH count(this_marriedWith0_marriedWith_Actor_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDStar.marriedWith must be less than or equal to one', [0]) RETURN c AS this_marriedWith0_marriedWith_Actor_unique_ignored @@ -386,7 +386,7 @@ describe("Math operators", () => { WITH this CALL { WITH * - MATCH (this)-[update_this0:\`MARRIED_WITH\`]->(update_this1:\`Star\`) + MATCH (this)-[update_this0:MARRIED_WITH]->(update_this1:Star) WITH update_this1 { __resolveType: \\"Star\\", __id: id(this), .marriageLength } AS update_this1 RETURN update_this1 AS update_var2 } diff --git a/packages/graphql/tests/tck/nested-unions.test.ts b/packages/graphql/tests/tck/nested-unions.test.ts index cc12853be7..ff3b62b387 100644 --- a/packages/graphql/tests/tck/nested-unions.test.ts +++ b/packages/graphql/tests/tck/nested-unions.test.ts @@ -92,7 +92,7 @@ describe("Nested Unions", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 WITH this CALL { @@ -106,7 +106,7 @@ describe("Nested Unions", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_actors_LeadActor0_node - MERGE (this)<-[:\`ACTED_IN\`]-(this_connect_actors_LeadActor0_node) + MERGE (this)<-[:ACTED_IN]-(this_connect_actors_LeadActor0_node) } } WITH this, this_connect_actors_LeadActor0_node @@ -121,7 +121,7 @@ describe("Nested Unions", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this_connect_actors_LeadActor0_node UNWIND connectedNodes as this_connect_actors_LeadActor0_node_actedIn_Series0_node - MERGE (this_connect_actors_LeadActor0_node)-[:\`ACTED_IN\`]->(this_connect_actors_LeadActor0_node_actedIn_Series0_node) + MERGE (this_connect_actors_LeadActor0_node)-[:ACTED_IN]->(this_connect_actors_LeadActor0_node_actedIn_Series0_node) } } WITH this, this_connect_actors_LeadActor0_node, this_connect_actors_LeadActor0_node_actedIn_Series0_node @@ -134,17 +134,17 @@ describe("Nested Unions", () => { WITH this CALL { WITH * - MATCH (this)<-[update_this0:\`ACTED_IN\`]-(update_this1:\`LeadActor\`) + MATCH (this)<-[update_this0:ACTED_IN]-(update_this1:LeadActor) CALL { WITH update_this1 CALL { WITH * - MATCH (update_this1)-[update_this2:\`ACTED_IN\`]->(update_this3:\`Movie\`) + MATCH (update_this1)-[update_this2:ACTED_IN]->(update_this3:Movie) WITH update_this3 { __resolveType: \\"Movie\\", __id: id(update_this1) } AS update_this3 RETURN update_this3 AS update_var4 UNION WITH * - MATCH (update_this1)-[update_this5:\`ACTED_IN\`]->(update_this6:\`Series\`) + MATCH (update_this1)-[update_this5:ACTED_IN]->(update_this6:Series) WITH update_this6 { __resolveType: \\"Series\\", __id: id(update_this1), .name } AS update_this6 RETURN update_this6 AS update_var4 } @@ -155,7 +155,7 @@ describe("Nested Unions", () => { RETURN update_this1 AS update_var7 UNION WITH * - MATCH (this)<-[update_this8:\`ACTED_IN\`]-(update_this9:\`Extra\`) + MATCH (this)<-[update_this8:ACTED_IN]-(update_this9:Extra) WITH update_this9 { __resolveType: \\"Extra\\", __id: id(this) } AS update_this9 RETURN update_this9 AS update_var7 } @@ -209,12 +209,12 @@ describe("Nested Unions", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 WITH this CALL { WITH this - OPTIONAL MATCH (this)<-[this_disconnect_actors_LeadActor0_rel:\`ACTED_IN\`]-(this_disconnect_actors_LeadActor0:LeadActor) + OPTIONAL MATCH (this)<-[this_disconnect_actors_LeadActor0_rel:ACTED_IN]-(this_disconnect_actors_LeadActor0:LeadActor) WHERE this_disconnect_actors_LeadActor0.name = $updateMovies_args_disconnect_actors_LeadActor0_where_LeadActor_this_disconnect_actors_LeadActor0param0 CALL { WITH this_disconnect_actors_LeadActor0, this_disconnect_actors_LeadActor0_rel, this @@ -224,7 +224,7 @@ describe("Nested Unions", () => { } CALL { WITH this, this_disconnect_actors_LeadActor0 - OPTIONAL MATCH (this_disconnect_actors_LeadActor0)-[this_disconnect_actors_LeadActor0_actedIn_Series0_rel:\`ACTED_IN\`]->(this_disconnect_actors_LeadActor0_actedIn_Series0:Series) + OPTIONAL MATCH (this_disconnect_actors_LeadActor0)-[this_disconnect_actors_LeadActor0_actedIn_Series0_rel:ACTED_IN]->(this_disconnect_actors_LeadActor0_actedIn_Series0:Series) WHERE this_disconnect_actors_LeadActor0_actedIn_Series0.name = $updateMovies_args_disconnect_actors_LeadActor0_disconnect_actedIn_Series0_where_Series_this_disconnect_actors_LeadActor0_actedIn_Series0param0 CALL { WITH this_disconnect_actors_LeadActor0_actedIn_Series0, this_disconnect_actors_LeadActor0_actedIn_Series0_rel, this_disconnect_actors_LeadActor0 @@ -241,17 +241,17 @@ describe("Nested Unions", () => { WITH this CALL { WITH * - MATCH (this)<-[update_this0:\`ACTED_IN\`]-(update_this1:\`LeadActor\`) + MATCH (this)<-[update_this0:ACTED_IN]-(update_this1:LeadActor) CALL { WITH update_this1 CALL { WITH * - MATCH (update_this1)-[update_this2:\`ACTED_IN\`]->(update_this3:\`Movie\`) + MATCH (update_this1)-[update_this2:ACTED_IN]->(update_this3:Movie) WITH update_this3 { __resolveType: \\"Movie\\", __id: id(update_this1) } AS update_this3 RETURN update_this3 AS update_var4 UNION WITH * - MATCH (update_this1)-[update_this5:\`ACTED_IN\`]->(update_this6:\`Series\`) + MATCH (update_this1)-[update_this5:ACTED_IN]->(update_this6:Series) WITH update_this6 { __resolveType: \\"Series\\", __id: id(update_this1), .name } AS update_this6 RETURN update_this6 AS update_var4 } @@ -262,7 +262,7 @@ describe("Nested Unions", () => { RETURN update_this1 AS update_var7 UNION WITH * - MATCH (this)<-[update_this8:\`ACTED_IN\`]-(update_this9:\`Extra\`) + MATCH (this)<-[update_this8:ACTED_IN]-(update_this9:Extra) WITH update_this9 { __resolveType: \\"Extra\\", __id: id(this) } AS update_this9 RETURN update_this9 AS update_var7 } diff --git a/packages/graphql/tests/tck/null.test.ts b/packages/graphql/tests/tck/null.test.ts index b6e79e2607..8e07d597eb 100644 --- a/packages/graphql/tests/tck/null.test.ts +++ b/packages/graphql/tests/tck/null.test.ts @@ -58,7 +58,7 @@ describe("Cypher NULL", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title IS NULL RETURN this { .title } AS this" `); @@ -78,7 +78,7 @@ describe("Cypher NULL", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title IS NOT NULL RETURN this { .title } AS this" `); @@ -98,9 +98,9 @@ describe("Cypher NULL", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE NOT (EXISTS { - MATCH (this)<-[:\`ACTED_IN\`]-(this0:\`Actor\`) + MATCH (this)<-[:ACTED_IN]-(this0:Actor) }) RETURN this { .title } AS this" `); @@ -120,9 +120,9 @@ describe("Cypher NULL", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE EXISTS { - MATCH (this)<-[:\`ACTED_IN\`]-(this0:\`Actor\`) + MATCH (this)<-[:ACTED_IN]-(this0:Actor) } RETURN this { .title } AS this" `); diff --git a/packages/graphql/tests/tck/operations/batch/batch-create-auth.test.ts b/packages/graphql/tests/tck/operations/batch/batch-create-auth.test.ts index 50c41fdff2..49d2088321 100644 --- a/packages/graphql/tests/tck/operations/batch/batch-create-auth.test.ts +++ b/packages/graphql/tests/tck/operations/batch/batch-create-auth.test.ts @@ -84,7 +84,7 @@ describe("Batch Create, Auth", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`Movie\`) + CREATE (create_this1:Movie) SET create_this1.id = create_var0.id WITH * @@ -92,7 +92,7 @@ describe("Batch Create, Auth", () => { WITH create_this1 CALL { WITH create_this1 - MATCH (create_this1)-[create_this1_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (create_this1)-[create_this1_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(create_this1_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.website must be less than or equal to one', [0]) RETURN c AS create_this1_website_Website_unique_ignored @@ -149,7 +149,7 @@ describe("Batch Create, Auth", () => { "UNWIND $create_param3 AS create_var4 CALL { WITH create_var4 - CREATE (create_this0:\`Movie\`) + CREATE (create_this0:Movie) SET create_this0.id = create_var4.id WITH create_this0, create_var4 @@ -157,17 +157,17 @@ describe("Batch Create, Auth", () => { WITH create_this0, create_var4 UNWIND create_var4.actors.create AS create_var5 WITH create_var5.node AS create_var6, create_var5.edge AS create_var7, create_this0 - CREATE (create_this8:\`Actor\`) + CREATE (create_this8:Actor) SET create_this8.name = create_var6.name, create_this8.id = randomUUID() - MERGE (create_this0)<-[create_this9:\`ACTED_IN\`]-(create_this8) + MERGE (create_this0)<-[create_this9:ACTED_IN]-(create_this8) SET create_this9.year = create_var7.year WITH create_this8 CALL { WITH create_this8 - MATCH (create_this8)-[create_this8_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (create_this8)-[create_this8_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(create_this8_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDActor.website must be less than or equal to one', [0]) RETURN c AS create_this8_website_Website_unique_ignored @@ -179,7 +179,7 @@ describe("Batch Create, Auth", () => { WITH create_this0 CALL { WITH create_this0 - MATCH (create_this0)-[create_this0_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (create_this0)-[create_this0_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(create_this0_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.website must be less than or equal to one', [0]) RETURN c AS create_this0_website_Website_unique_ignored @@ -188,7 +188,7 @@ describe("Batch Create, Auth", () => { } CALL { WITH create_this0 - MATCH (create_this0)<-[create_this1:\`ACTED_IN\`]-(create_this2:\`Actor\`) + MATCH (create_this0)<-[create_this1:ACTED_IN]-(create_this2:Actor) WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND create_this2.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH create_this2 { .name } AS create_this2 RETURN collect(create_this2) AS create_var3 @@ -292,12 +292,12 @@ describe("Batch Create, Auth", () => { CREATE (this0_actors0_node:Actor) SET this0_actors0_node.id = randomUUID() SET this0_actors0_node.name = $this0_actors0_node_name - MERGE (this0)<-[this0_actors0_relationship:\`ACTED_IN\`]-(this0_actors0_node) + MERGE (this0)<-[this0_actors0_relationship:ACTED_IN]-(this0_actors0_node) SET this0_actors0_relationship.year = $this0_actors0_relationship_year WITH this0, this0_actors0_node CALL { WITH this0_actors0_node - MATCH (this0_actors0_node)-[this0_actors0_node_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (this0_actors0_node)-[this0_actors0_node_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(this0_actors0_node_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDActor.website must be less than or equal to one', [0]) RETURN c AS this0_actors0_node_website_Website_unique_ignored @@ -307,7 +307,7 @@ describe("Batch Create, Auth", () => { WITH this0 CALL { WITH this0 - MATCH (this0)-[this0_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (this0)-[this0_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(this0_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.website must be less than or equal to one', [0]) RETURN c AS this0_website_Website_unique_ignored @@ -321,12 +321,12 @@ describe("Batch Create, Auth", () => { CREATE (this1_actors0_node:Actor) SET this1_actors0_node.id = randomUUID() SET this1_actors0_node.name = $this1_actors0_node_name - MERGE (this1)<-[this1_actors0_relationship:\`ACTED_IN\`]-(this1_actors0_node) + MERGE (this1)<-[this1_actors0_relationship:ACTED_IN]-(this1_actors0_node) SET this1_actors0_relationship.year = $this1_actors0_relationship_year WITH this1, this1_actors0_node CALL { WITH this1_actors0_node - MATCH (this1_actors0_node)-[this1_actors0_node_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (this1_actors0_node)-[this1_actors0_node_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(this1_actors0_node_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDActor.website must be less than or equal to one', [0]) RETURN c AS this1_actors0_node_website_Website_unique_ignored @@ -336,7 +336,7 @@ describe("Batch Create, Auth", () => { WITH this1 CALL { WITH this1 - MATCH (this1)-[this1_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (this1)-[this1_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(this1_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.website must be less than or equal to one', [0]) RETURN c AS this1_website_Website_unique_ignored @@ -349,13 +349,13 @@ describe("Batch Create, Auth", () => { WITH this2 CREATE (this2_website0_node:Website) SET this2_website0_node.address = $this2_website0_node_address - MERGE (this2)-[:\`HAS_WEBSITE\`]->(this2_website0_node) + MERGE (this2)-[:HAS_WEBSITE]->(this2_website0_node) WITH this2 WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND $authorization_param1 IN $jwt.roles), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this2 CALL { WITH this2 - MATCH (this2)-[this2_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (this2)-[this2_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(this2_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.website must be less than or equal to one', [0]) RETURN c AS this2_website_Website_unique_ignored @@ -377,7 +377,7 @@ describe("Batch Create, Auth", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this3 UNWIND connectedNodes as this3_actors_connect0_node - MERGE (this3)<-[this3_actors_connect0_relationship:\`ACTED_IN\`]-(this3_actors_connect0_node) + MERGE (this3)<-[this3_actors_connect0_relationship:ACTED_IN]-(this3_actors_connect0_node) } } WITH this3, this3_actors_connect0_node @@ -388,7 +388,7 @@ describe("Batch Create, Auth", () => { WITH this3 CALL { WITH this3 - MATCH (this3)-[this3_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (this3)-[this3_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(this3_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.website must be less than or equal to one', [0]) RETURN c AS this3_website_Website_unique_ignored @@ -401,10 +401,10 @@ describe("Batch Create, Auth", () => { WITH this4 CALL { WITH this4 - MERGE (this4_actors_connectOrCreate0:\`Actor\` { id: $this4_actors_connectOrCreate_param0 }) + MERGE (this4_actors_connectOrCreate0:Actor { id: $this4_actors_connectOrCreate_param0 }) ON CREATE SET this4_actors_connectOrCreate0.name = $this4_actors_connectOrCreate_param1 - MERGE (this4)<-[this4_actors_connectOrCreate_this0:\`ACTED_IN\`]-(this4_actors_connectOrCreate0) + MERGE (this4)<-[this4_actors_connectOrCreate_this0:ACTED_IN]-(this4_actors_connectOrCreate0) RETURN count(*) AS _ } WITH this4 @@ -412,7 +412,7 @@ describe("Batch Create, Auth", () => { WITH this4 CALL { WITH this4 - MATCH (this4)-[this4_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (this4)-[this4_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(this4_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.website must be less than or equal to one', [0]) RETURN c AS this4_website_Website_unique_ignored @@ -421,70 +421,70 @@ describe("Batch Create, Auth", () => { } CALL { WITH this0 - MATCH (this0)-[create_this0:\`HAS_WEBSITE\`]->(create_this1:\`Website\`) + MATCH (this0)-[create_this0:HAS_WEBSITE]->(create_this1:Website) WITH create_this1 { .address } AS create_this1 RETURN head(collect(create_this1)) AS create_var2 } CALL { WITH this0 - MATCH (this0)<-[create_this3:\`ACTED_IN\`]-(create_this4:\`Actor\`) + MATCH (this0)<-[create_this3:ACTED_IN]-(create_this4:Actor) WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND create_this4.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH create_this4 { .name } AS create_this4 RETURN collect(create_this4) AS create_var5 } CALL { WITH this1 - MATCH (this1)-[create_this6:\`HAS_WEBSITE\`]->(create_this7:\`Website\`) + MATCH (this1)-[create_this6:HAS_WEBSITE]->(create_this7:Website) WITH create_this7 { .address } AS create_this7 RETURN head(collect(create_this7)) AS create_var8 } CALL { WITH this1 - MATCH (this1)<-[create_this9:\`ACTED_IN\`]-(create_this10:\`Actor\`) + MATCH (this1)<-[create_this9:ACTED_IN]-(create_this10:Actor) WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND create_this10.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH create_this10 { .name } AS create_this10 RETURN collect(create_this10) AS create_var11 } CALL { WITH this2 - MATCH (this2)-[create_this12:\`HAS_WEBSITE\`]->(create_this13:\`Website\`) + MATCH (this2)-[create_this12:HAS_WEBSITE]->(create_this13:Website) WITH create_this13 { .address } AS create_this13 RETURN head(collect(create_this13)) AS create_var14 } CALL { WITH this2 - MATCH (this2)<-[create_this15:\`ACTED_IN\`]-(create_this16:\`Actor\`) + MATCH (this2)<-[create_this15:ACTED_IN]-(create_this16:Actor) WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND create_this16.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH create_this16 { .name } AS create_this16 RETURN collect(create_this16) AS create_var17 } CALL { WITH this3 - MATCH (this3)-[create_this18:\`HAS_WEBSITE\`]->(create_this19:\`Website\`) + MATCH (this3)-[create_this18:HAS_WEBSITE]->(create_this19:Website) WITH create_this19 { .address } AS create_this19 RETURN head(collect(create_this19)) AS create_var20 } CALL { WITH this3 - MATCH (this3)<-[create_this21:\`ACTED_IN\`]-(create_this22:\`Actor\`) + MATCH (this3)<-[create_this21:ACTED_IN]-(create_this22:Actor) WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND create_this22.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH create_this22 { .name } AS create_this22 RETURN collect(create_this22) AS create_var23 } CALL { WITH this4 - MATCH (this4)-[create_this24:\`HAS_WEBSITE\`]->(create_this25:\`Website\`) + MATCH (this4)-[create_this24:HAS_WEBSITE]->(create_this25:Website) WITH create_this25 { .address } AS create_this25 RETURN head(collect(create_this25)) AS create_var26 } CALL { WITH this4 - MATCH (this4)<-[create_this27:\`ACTED_IN\`]-(create_this28:\`Actor\`) + MATCH (this4)<-[create_this27:ACTED_IN]-(create_this28:Actor) WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND create_this28.id = coalesce($jwt.sub, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH create_this28 { .name } AS create_this28 RETURN collect(create_this28) AS create_var29 } - RETURN [ this0 { .id, website: create_var2, actors: create_var5 }, this1 { .id, website: create_var8, actors: create_var11 }, this2 { .id, website: create_var14, actors: create_var17 }, this3 { .id, website: create_var20, actors: create_var23 }, this4 { .id, website: create_var26, actors: create_var29 } ] AS data" + RETURN [this0 { .id, website: create_var2, actors: create_var5 }, this1 { .id, website: create_var8, actors: create_var11 }, this2 { .id, website: create_var14, actors: create_var17 }, this3 { .id, website: create_var20, actors: create_var23 }, this4 { .id, website: create_var26, actors: create_var29 }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` diff --git a/packages/graphql/tests/tck/operations/batch/batch-create-fields.test.ts b/packages/graphql/tests/tck/operations/batch/batch-create-fields.test.ts index 2c5d14a066..191757e0ce 100644 --- a/packages/graphql/tests/tck/operations/batch/batch-create-fields.test.ts +++ b/packages/graphql/tests/tck/operations/batch/batch-create-fields.test.ts @@ -82,7 +82,7 @@ describe("Batch Create, Scalar types", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`Movie\`) + CREATE (create_this1:Movie) SET create_this1.id = create_var0.id, create_this1.runningTime = create_var0.runningTime, @@ -91,7 +91,7 @@ describe("Batch Create, Scalar types", () => { WITH create_this1 CALL { WITH create_this1 - MATCH (create_this1)-[create_this1_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (create_this1)-[create_this1_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(create_this1_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.website must be less than or equal to one', [0]) RETURN c AS create_this1_website_Website_unique_ignored @@ -167,7 +167,7 @@ describe("Batch Create, Scalar types", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`Movie\`) + CREATE (create_this1:Movie) SET create_this1.id = create_var0.id, create_this1.createdAt = datetime() @@ -176,12 +176,12 @@ describe("Batch Create, Scalar types", () => { WITH create_this1, create_var0 UNWIND create_var0.actors.create AS create_var2 WITH create_var2.node AS create_var3, create_var2.edge AS create_var4, create_this1 - CREATE (create_this5:\`Actor\`) + CREATE (create_this5:Actor) SET create_this5.name = create_var3.name, create_this5.createdAt = datetime(), create_this5.id = randomUUID() - MERGE (create_this1)<-[create_this6:\`ACTED_IN\`]-(create_this5) + MERGE (create_this1)<-[create_this6:ACTED_IN]-(create_this5) SET create_this6.year = create_var4.year WITH create_this5, create_var3 @@ -189,16 +189,16 @@ describe("Batch Create, Scalar types", () => { WITH create_this5, create_var3 UNWIND create_var3.website.create AS create_var7 WITH create_var7.node AS create_var8, create_var7.edge AS create_var9, create_this5 - CREATE (create_this10:\`Website\`) + CREATE (create_this10:Website) SET create_this10.address = create_var8.address - MERGE (create_this5)-[create_this11:\`HAS_WEBSITE\`]->(create_this10) + MERGE (create_this5)-[create_this11:HAS_WEBSITE]->(create_this10) RETURN collect(NULL) AS create_var12 } WITH create_this5 CALL { WITH create_this5 - MATCH (create_this5)-[create_this5_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (create_this5)-[create_this5_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(create_this5_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDActor.website must be less than or equal to one', [0]) RETURN c AS create_this5_website_Website_unique_ignored @@ -210,16 +210,16 @@ describe("Batch Create, Scalar types", () => { WITH create_this1, create_var0 UNWIND create_var0.website.create AS create_var14 WITH create_var14.node AS create_var15, create_var14.edge AS create_var16, create_this1 - CREATE (create_this17:\`Website\`) + CREATE (create_this17:Website) SET create_this17.address = create_var15.address - MERGE (create_this1)-[create_this18:\`HAS_WEBSITE\`]->(create_this17) + MERGE (create_this1)-[create_this18:HAS_WEBSITE]->(create_this17) RETURN collect(NULL) AS create_var19 } WITH create_this1 CALL { WITH create_this1 - MATCH (create_this1)-[create_this1_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (create_this1)-[create_this1_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(create_this1_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.website must be less than or equal to one', [0]) RETURN c AS create_this1_website_Website_unique_ignored @@ -298,7 +298,7 @@ describe("Batch Create, Scalar types", () => { "UNWIND $create_param0 AS create_var4 CALL { WITH create_var4 - CREATE (create_this0:\`Movie\`) + CREATE (create_this0:Movie) SET create_this0.id = create_var4.id, create_this0.createdAt = datetime() @@ -307,18 +307,18 @@ describe("Batch Create, Scalar types", () => { WITH create_this0, create_var4 UNWIND create_var4.actors.create AS create_var5 WITH create_var5.node AS create_var6, create_var5.edge AS create_var7, create_this0 - CREATE (create_this8:\`Actor\`) + CREATE (create_this8:Actor) SET create_this8.name = create_var6.name, create_this8.createdAt = datetime(), create_this8.id = randomUUID() - MERGE (create_this0)<-[create_this9:\`ACTED_IN\`]-(create_this8) + MERGE (create_this0)<-[create_this9:ACTED_IN]-(create_this8) SET create_this9.year = create_var7.year WITH create_this8 CALL { WITH create_this8 - MATCH (create_this8)-[create_this8_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (create_this8)-[create_this8_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(create_this8_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDActor.website must be less than or equal to one', [0]) RETURN c AS create_this8_website_Website_unique_ignored @@ -328,7 +328,7 @@ describe("Batch Create, Scalar types", () => { WITH create_this0 CALL { WITH create_this0 - MATCH (create_this0)-[create_this0_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (create_this0)-[create_this0_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(create_this0_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.website must be less than or equal to one', [0]) RETURN c AS create_this0_website_Website_unique_ignored @@ -337,7 +337,7 @@ describe("Batch Create, Scalar types", () => { } CALL { WITH create_this0 - MATCH (create_this0)<-[create_this1:\`ACTED_IN\`]-(create_this2:\`Actor\`) + MATCH (create_this0)<-[create_this1:ACTED_IN]-(create_this2:Actor) WITH create_this2 { .name } AS create_this2 RETURN collect(create_this2) AS create_var3 } @@ -434,12 +434,12 @@ describe("Batch Create, Scalar types", () => { SET this0_actors0_node.createdAt = datetime() SET this0_actors0_node.id = randomUUID() SET this0_actors0_node.name = $this0_actors0_node_name - MERGE (this0)<-[this0_actors0_relationship:\`ACTED_IN\`]-(this0_actors0_node) + MERGE (this0)<-[this0_actors0_relationship:ACTED_IN]-(this0_actors0_node) SET this0_actors0_relationship.year = $this0_actors0_relationship_year WITH this0, this0_actors0_node CALL { WITH this0_actors0_node - MATCH (this0_actors0_node)-[this0_actors0_node_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (this0_actors0_node)-[this0_actors0_node_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(this0_actors0_node_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDActor.website must be less than or equal to one', [0]) RETURN c AS this0_actors0_node_website_Website_unique_ignored @@ -447,7 +447,7 @@ describe("Batch Create, Scalar types", () => { WITH this0 CALL { WITH this0 - MATCH (this0)-[this0_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (this0)-[this0_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(this0_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.website must be less than or equal to one', [0]) RETURN c AS this0_website_Website_unique_ignored @@ -463,12 +463,12 @@ describe("Batch Create, Scalar types", () => { SET this1_actors0_node.createdAt = datetime() SET this1_actors0_node.id = randomUUID() SET this1_actors0_node.name = $this1_actors0_node_name - MERGE (this1)<-[this1_actors0_relationship:\`ACTED_IN\`]-(this1_actors0_node) + MERGE (this1)<-[this1_actors0_relationship:ACTED_IN]-(this1_actors0_node) SET this1_actors0_relationship.year = $this1_actors0_relationship_year WITH this1, this1_actors0_node CALL { WITH this1_actors0_node - MATCH (this1_actors0_node)-[this1_actors0_node_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (this1_actors0_node)-[this1_actors0_node_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(this1_actors0_node_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDActor.website must be less than or equal to one', [0]) RETURN c AS this1_actors0_node_website_Website_unique_ignored @@ -476,7 +476,7 @@ describe("Batch Create, Scalar types", () => { WITH this1 CALL { WITH this1 - MATCH (this1)-[this1_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (this1)-[this1_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(this1_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.website must be less than or equal to one', [0]) RETURN c AS this1_website_Website_unique_ignored @@ -490,11 +490,11 @@ describe("Batch Create, Scalar types", () => { WITH this2 CREATE (this2_website0_node:Website) SET this2_website0_node.address = $this2_website0_node_address - MERGE (this2)-[:\`HAS_WEBSITE\`]->(this2_website0_node) + MERGE (this2)-[:HAS_WEBSITE]->(this2_website0_node) WITH this2 CALL { WITH this2 - MATCH (this2)-[this2_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (this2)-[this2_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(this2_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.website must be less than or equal to one', [0]) RETURN c AS this2_website_Website_unique_ignored @@ -517,7 +517,7 @@ describe("Batch Create, Scalar types", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this3 UNWIND connectedNodes as this3_actors_connect0_node - MERGE (this3)<-[this3_actors_connect0_relationship:\`ACTED_IN\`]-(this3_actors_connect0_node) + MERGE (this3)<-[this3_actors_connect0_relationship:ACTED_IN]-(this3_actors_connect0_node) } } WITH this3, this3_actors_connect0_node @@ -526,7 +526,7 @@ describe("Batch Create, Scalar types", () => { WITH this3 CALL { WITH this3 - MATCH (this3)-[this3_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (this3)-[this3_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(this3_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.website must be less than or equal to one', [0]) RETURN c AS this3_website_Website_unique_ignored @@ -540,17 +540,17 @@ describe("Batch Create, Scalar types", () => { WITH this4 CALL { WITH this4 - MERGE (this4_actors_connectOrCreate0:\`Actor\` { id: $this4_actors_connectOrCreate_param0 }) + MERGE (this4_actors_connectOrCreate0:Actor { id: $this4_actors_connectOrCreate_param0 }) ON CREATE SET this4_actors_connectOrCreate0.createdAt = datetime(), this4_actors_connectOrCreate0.name = $this4_actors_connectOrCreate_param1 - MERGE (this4)<-[this4_actors_connectOrCreate_this0:\`ACTED_IN\`]-(this4_actors_connectOrCreate0) + MERGE (this4)<-[this4_actors_connectOrCreate_this0:ACTED_IN]-(this4_actors_connectOrCreate0) RETURN count(*) AS _ } WITH this4 CALL { WITH this4 - MATCH (this4)-[this4_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (this4)-[this4_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(this4_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.website must be less than or equal to one', [0]) RETURN c AS this4_website_Website_unique_ignored @@ -559,65 +559,65 @@ describe("Batch Create, Scalar types", () => { } CALL { WITH this0 - MATCH (this0)-[create_this0:\`HAS_WEBSITE\`]->(create_this1:\`Website\`) + MATCH (this0)-[create_this0:HAS_WEBSITE]->(create_this1:Website) WITH create_this1 { .address } AS create_this1 RETURN head(collect(create_this1)) AS create_var2 } CALL { WITH this0 - MATCH (this0)<-[create_this3:\`ACTED_IN\`]-(create_this4:\`Actor\`) + MATCH (this0)<-[create_this3:ACTED_IN]-(create_this4:Actor) WITH create_this4 { .name } AS create_this4 RETURN collect(create_this4) AS create_var5 } CALL { WITH this1 - MATCH (this1)-[create_this6:\`HAS_WEBSITE\`]->(create_this7:\`Website\`) + MATCH (this1)-[create_this6:HAS_WEBSITE]->(create_this7:Website) WITH create_this7 { .address } AS create_this7 RETURN head(collect(create_this7)) AS create_var8 } CALL { WITH this1 - MATCH (this1)<-[create_this9:\`ACTED_IN\`]-(create_this10:\`Actor\`) + MATCH (this1)<-[create_this9:ACTED_IN]-(create_this10:Actor) WITH create_this10 { .name } AS create_this10 RETURN collect(create_this10) AS create_var11 } CALL { WITH this2 - MATCH (this2)-[create_this12:\`HAS_WEBSITE\`]->(create_this13:\`Website\`) + MATCH (this2)-[create_this12:HAS_WEBSITE]->(create_this13:Website) WITH create_this13 { .address } AS create_this13 RETURN head(collect(create_this13)) AS create_var14 } CALL { WITH this2 - MATCH (this2)<-[create_this15:\`ACTED_IN\`]-(create_this16:\`Actor\`) + MATCH (this2)<-[create_this15:ACTED_IN]-(create_this16:Actor) WITH create_this16 { .name } AS create_this16 RETURN collect(create_this16) AS create_var17 } CALL { WITH this3 - MATCH (this3)-[create_this18:\`HAS_WEBSITE\`]->(create_this19:\`Website\`) + MATCH (this3)-[create_this18:HAS_WEBSITE]->(create_this19:Website) WITH create_this19 { .address } AS create_this19 RETURN head(collect(create_this19)) AS create_var20 } CALL { WITH this3 - MATCH (this3)<-[create_this21:\`ACTED_IN\`]-(create_this22:\`Actor\`) + MATCH (this3)<-[create_this21:ACTED_IN]-(create_this22:Actor) WITH create_this22 { .name } AS create_this22 RETURN collect(create_this22) AS create_var23 } CALL { WITH this4 - MATCH (this4)-[create_this24:\`HAS_WEBSITE\`]->(create_this25:\`Website\`) + MATCH (this4)-[create_this24:HAS_WEBSITE]->(create_this25:Website) WITH create_this25 { .address } AS create_this25 RETURN head(collect(create_this25)) AS create_var26 } CALL { WITH this4 - MATCH (this4)<-[create_this27:\`ACTED_IN\`]-(create_this28:\`Actor\`) + MATCH (this4)<-[create_this27:ACTED_IN]-(create_this28:Actor) WITH create_this28 { .name } AS create_this28 RETURN collect(create_this28) AS create_var29 } - RETURN [ this0 { .id, website: create_var2, actors: create_var5 }, this1 { .id, website: create_var8, actors: create_var11 }, this2 { .id, website: create_var14, actors: create_var17 }, this3 { .id, website: create_var20, actors: create_var23 }, this4 { .id, website: create_var26, actors: create_var29 } ] AS data" + RETURN [this0 { .id, website: create_var2, actors: create_var5 }, this1 { .id, website: create_var8, actors: create_var11 }, this2 { .id, website: create_var14, actors: create_var17 }, this3 { .id, website: create_var20, actors: create_var23 }, this4 { .id, website: create_var26, actors: create_var29 }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` diff --git a/packages/graphql/tests/tck/operations/batch/batch-create-interface.test.ts b/packages/graphql/tests/tck/operations/batch/batch-create-interface.test.ts index fdb6e9db18..cbd441122d 100644 --- a/packages/graphql/tests/tck/operations/batch/batch-create-interface.test.ts +++ b/packages/graphql/tests/tck/operations/batch/batch-create-interface.test.ts @@ -84,13 +84,13 @@ describe("Batch Create, Interface", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`Movie\`) + CREATE (create_this1:Movie) SET create_this1.id = create_var0.id WITH create_this1 CALL { WITH create_this1 - MATCH (create_this1)-[create_this1_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (create_this1)-[create_this1_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(create_this1_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.website must be less than or equal to one', [0]) RETURN c AS create_this1_website_Website_unique_ignored @@ -154,12 +154,12 @@ describe("Batch Create, Interface", () => { CREATE (this0_workersActor0_node:Actor) SET this0_workersActor0_node.id = $this0_workersActor0_node_id SET this0_workersActor0_node.name = $this0_workersActor0_node_name - MERGE (this0)<-[this0_workersActor0_relationship:\`EMPLOYED\`]-(this0_workersActor0_node) + MERGE (this0)<-[this0_workersActor0_relationship:EMPLOYED]-(this0_workersActor0_node) SET this0_workersActor0_relationship.year = $this0_workersActor0_relationship_year WITH this0, this0_workersActor0_node CALL { WITH this0_workersActor0_node - MATCH (this0_workersActor0_node)-[this0_workersActor0_node_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (this0_workersActor0_node)-[this0_workersActor0_node_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(this0_workersActor0_node_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDActor.website must be less than or equal to one', [0]) RETURN c AS this0_workersActor0_node_website_Website_unique_ignored @@ -167,7 +167,7 @@ describe("Batch Create, Interface", () => { WITH this0 CALL { WITH this0 - MATCH (this0)-[this0_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (this0)-[this0_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(this0_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.website must be less than or equal to one', [0]) RETURN c AS this0_website_Website_unique_ignored @@ -181,12 +181,12 @@ describe("Batch Create, Interface", () => { CREATE (this1_workersModeler0_node:Modeler) SET this1_workersModeler0_node.id = $this1_workersModeler0_node_id SET this1_workersModeler0_node.name = $this1_workersModeler0_node_name - MERGE (this1)<-[this1_workersModeler0_relationship:\`EMPLOYED\`]-(this1_workersModeler0_node) + MERGE (this1)<-[this1_workersModeler0_relationship:EMPLOYED]-(this1_workersModeler0_node) SET this1_workersModeler0_relationship.year = $this1_workersModeler0_relationship_year WITH this1, this1_workersModeler0_node CALL { WITH this1_workersModeler0_node - MATCH (this1_workersModeler0_node)-[this1_workersModeler0_node_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (this1_workersModeler0_node)-[this1_workersModeler0_node_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(this1_workersModeler0_node_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDModeler.website must be less than or equal to one', [0]) RETURN c AS this1_workersModeler0_node_website_Website_unique_ignored @@ -194,7 +194,7 @@ describe("Batch Create, Interface", () => { WITH this1 CALL { WITH this1 - MATCH (this1)-[this1_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (this1)-[this1_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(this1_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.website must be less than or equal to one', [0]) RETURN c AS this1_website_Website_unique_ignored @@ -205,12 +205,12 @@ describe("Batch Create, Interface", () => { WITH this0 CALL { WITH * - MATCH (this0)<-[create_this0:\`EMPLOYED\`]-(create_this1:\`Actor\`) + MATCH (this0)<-[create_this0:EMPLOYED]-(create_this1:Actor) WITH create_this1 { __resolveType: \\"Actor\\", __id: id(this0), .name } AS create_this1 RETURN create_this1 AS create_var2 UNION WITH * - MATCH (this0)<-[create_this3:\`EMPLOYED\`]-(create_this4:\`Modeler\`) + MATCH (this0)<-[create_this3:EMPLOYED]-(create_this4:Modeler) WITH create_this4 { __resolveType: \\"Modeler\\", __id: id(this0), .name } AS create_this4 RETURN create_this4 AS create_var2 } @@ -221,19 +221,19 @@ describe("Batch Create, Interface", () => { WITH this1 CALL { WITH * - MATCH (this1)<-[create_this5:\`EMPLOYED\`]-(create_this6:\`Actor\`) + MATCH (this1)<-[create_this5:EMPLOYED]-(create_this6:Actor) WITH create_this6 { __resolveType: \\"Actor\\", __id: id(this1), .name } AS create_this6 RETURN create_this6 AS create_var7 UNION WITH * - MATCH (this1)<-[create_this8:\`EMPLOYED\`]-(create_this9:\`Modeler\`) + MATCH (this1)<-[create_this8:EMPLOYED]-(create_this9:Modeler) WITH create_this9 { __resolveType: \\"Modeler\\", __id: id(this1), .name } AS create_this9 RETURN create_this9 AS create_var7 } WITH create_var7 RETURN collect(create_var7) AS create_var7 } - RETURN [ this0 { .id, workers: create_var2 }, this1 { .id, workers: create_var7 } ] AS data" + RETURN [this0 { .id, workers: create_var2 }, this1 { .id, workers: create_var7 }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -301,12 +301,12 @@ describe("Batch Create, Interface", () => { CREATE (this0_workersActor0_node:Actor) SET this0_workersActor0_node.id = $this0_workersActor0_node_id SET this0_workersActor0_node.name = $this0_workersActor0_node_name - MERGE (this0)<-[this0_workersActor0_relationship:\`EMPLOYED\`]-(this0_workersActor0_node) + MERGE (this0)<-[this0_workersActor0_relationship:EMPLOYED]-(this0_workersActor0_node) SET this0_workersActor0_relationship.year = $this0_workersActor0_relationship_year WITH this0, this0_workersActor0_node CALL { WITH this0_workersActor0_node - MATCH (this0_workersActor0_node)-[this0_workersActor0_node_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (this0_workersActor0_node)-[this0_workersActor0_node_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(this0_workersActor0_node_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDActor.website must be less than or equal to one', [0]) RETURN c AS this0_workersActor0_node_website_Website_unique_ignored @@ -314,7 +314,7 @@ describe("Batch Create, Interface", () => { WITH this0 CALL { WITH this0 - MATCH (this0)-[this0_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (this0)-[this0_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(this0_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.website must be less than or equal to one', [0]) RETURN c AS this0_website_Website_unique_ignored @@ -328,12 +328,12 @@ describe("Batch Create, Interface", () => { CREATE (this1_workersActor0_node:Actor) SET this1_workersActor0_node.id = $this1_workersActor0_node_id SET this1_workersActor0_node.name = $this1_workersActor0_node_name - MERGE (this1)<-[this1_workersActor0_relationship:\`EMPLOYED\`]-(this1_workersActor0_node) + MERGE (this1)<-[this1_workersActor0_relationship:EMPLOYED]-(this1_workersActor0_node) SET this1_workersActor0_relationship.year = $this1_workersActor0_relationship_year WITH this1, this1_workersActor0_node CALL { WITH this1_workersActor0_node - MATCH (this1_workersActor0_node)-[this1_workersActor0_node_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (this1_workersActor0_node)-[this1_workersActor0_node_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(this1_workersActor0_node_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDActor.website must be less than or equal to one', [0]) RETURN c AS this1_workersActor0_node_website_Website_unique_ignored @@ -341,7 +341,7 @@ describe("Batch Create, Interface", () => { WITH this1 CALL { WITH this1 - MATCH (this1)-[this1_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (this1)-[this1_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(this1_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.website must be less than or equal to one', [0]) RETURN c AS this1_website_Website_unique_ignored @@ -354,11 +354,11 @@ describe("Batch Create, Interface", () => { WITH this2 CREATE (this2_website0_node:Website) SET this2_website0_node.address = $this2_website0_node_address - MERGE (this2)-[:\`HAS_WEBSITE\`]->(this2_website0_node) + MERGE (this2)-[:HAS_WEBSITE]->(this2_website0_node) WITH this2 CALL { WITH this2 - MATCH (this2)-[this2_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (this2)-[this2_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(this2_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.website must be less than or equal to one', [0]) RETURN c AS this2_website_Website_unique_ignored @@ -380,7 +380,7 @@ describe("Batch Create, Interface", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this3 UNWIND connectedNodes as this3_workers_connect0_node - MERGE (this3)<-[this3_workers_connect0_relationship:\`EMPLOYED\`]-(this3_workers_connect0_node) + MERGE (this3)<-[this3_workers_connect0_relationship:EMPLOYED]-(this3_workers_connect0_node) } } WITH this3, this3_workers_connect0_node @@ -397,7 +397,7 @@ describe("Batch Create, Interface", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this3 UNWIND connectedNodes as this3_workers_connect1_node - MERGE (this3)<-[this3_workers_connect1_relationship:\`EMPLOYED\`]-(this3_workers_connect1_node) + MERGE (this3)<-[this3_workers_connect1_relationship:EMPLOYED]-(this3_workers_connect1_node) } } WITH this3, this3_workers_connect1_node @@ -406,7 +406,7 @@ describe("Batch Create, Interface", () => { WITH this3 CALL { WITH this3 - MATCH (this3)-[this3_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (this3)-[this3_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(this3_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.website must be less than or equal to one', [0]) RETURN c AS this3_website_Website_unique_ignored @@ -415,7 +415,7 @@ describe("Batch Create, Interface", () => { } CALL { WITH this0 - MATCH (this0)-[create_this0:\`HAS_WEBSITE\`]->(create_this1:\`Website\`) + MATCH (this0)-[create_this0:HAS_WEBSITE]->(create_this1:Website) WITH create_this1 { .address } AS create_this1 RETURN head(collect(create_this1)) AS create_var2 } @@ -423,12 +423,12 @@ describe("Batch Create, Interface", () => { WITH this0 CALL { WITH * - MATCH (this0)<-[create_this3:\`EMPLOYED\`]-(create_this4:\`Actor\`) + MATCH (this0)<-[create_this3:EMPLOYED]-(create_this4:Actor) WITH create_this4 { __resolveType: \\"Actor\\", __id: id(this0), .name } AS create_this4 RETURN create_this4 AS create_var5 UNION WITH * - MATCH (this0)<-[create_this6:\`EMPLOYED\`]-(create_this7:\`Modeler\`) + MATCH (this0)<-[create_this6:EMPLOYED]-(create_this7:Modeler) WITH create_this7 { __resolveType: \\"Modeler\\", __id: id(this0), .name } AS create_this7 RETURN create_this7 AS create_var5 } @@ -437,7 +437,7 @@ describe("Batch Create, Interface", () => { } CALL { WITH this1 - MATCH (this1)-[create_this8:\`HAS_WEBSITE\`]->(create_this9:\`Website\`) + MATCH (this1)-[create_this8:HAS_WEBSITE]->(create_this9:Website) WITH create_this9 { .address } AS create_this9 RETURN head(collect(create_this9)) AS create_var10 } @@ -445,12 +445,12 @@ describe("Batch Create, Interface", () => { WITH this1 CALL { WITH * - MATCH (this1)<-[create_this11:\`EMPLOYED\`]-(create_this12:\`Actor\`) + MATCH (this1)<-[create_this11:EMPLOYED]-(create_this12:Actor) WITH create_this12 { __resolveType: \\"Actor\\", __id: id(this1), .name } AS create_this12 RETURN create_this12 AS create_var13 UNION WITH * - MATCH (this1)<-[create_this14:\`EMPLOYED\`]-(create_this15:\`Modeler\`) + MATCH (this1)<-[create_this14:EMPLOYED]-(create_this15:Modeler) WITH create_this15 { __resolveType: \\"Modeler\\", __id: id(this1), .name } AS create_this15 RETURN create_this15 AS create_var13 } @@ -459,7 +459,7 @@ describe("Batch Create, Interface", () => { } CALL { WITH this2 - MATCH (this2)-[create_this16:\`HAS_WEBSITE\`]->(create_this17:\`Website\`) + MATCH (this2)-[create_this16:HAS_WEBSITE]->(create_this17:Website) WITH create_this17 { .address } AS create_this17 RETURN head(collect(create_this17)) AS create_var18 } @@ -467,12 +467,12 @@ describe("Batch Create, Interface", () => { WITH this2 CALL { WITH * - MATCH (this2)<-[create_this19:\`EMPLOYED\`]-(create_this20:\`Actor\`) + MATCH (this2)<-[create_this19:EMPLOYED]-(create_this20:Actor) WITH create_this20 { __resolveType: \\"Actor\\", __id: id(this2), .name } AS create_this20 RETURN create_this20 AS create_var21 UNION WITH * - MATCH (this2)<-[create_this22:\`EMPLOYED\`]-(create_this23:\`Modeler\`) + MATCH (this2)<-[create_this22:EMPLOYED]-(create_this23:Modeler) WITH create_this23 { __resolveType: \\"Modeler\\", __id: id(this2), .name } AS create_this23 RETURN create_this23 AS create_var21 } @@ -481,7 +481,7 @@ describe("Batch Create, Interface", () => { } CALL { WITH this3 - MATCH (this3)-[create_this24:\`HAS_WEBSITE\`]->(create_this25:\`Website\`) + MATCH (this3)-[create_this24:HAS_WEBSITE]->(create_this25:Website) WITH create_this25 { .address } AS create_this25 RETURN head(collect(create_this25)) AS create_var26 } @@ -489,19 +489,19 @@ describe("Batch Create, Interface", () => { WITH this3 CALL { WITH * - MATCH (this3)<-[create_this27:\`EMPLOYED\`]-(create_this28:\`Actor\`) + MATCH (this3)<-[create_this27:EMPLOYED]-(create_this28:Actor) WITH create_this28 { __resolveType: \\"Actor\\", __id: id(this3), .name } AS create_this28 RETURN create_this28 AS create_var29 UNION WITH * - MATCH (this3)<-[create_this30:\`EMPLOYED\`]-(create_this31:\`Modeler\`) + MATCH (this3)<-[create_this30:EMPLOYED]-(create_this31:Modeler) WITH create_this31 { __resolveType: \\"Modeler\\", __id: id(this3), .name } AS create_this31 RETURN create_this31 AS create_var29 } WITH create_var29 RETURN collect(create_var29) AS create_var29 } - RETURN [ this0 { .id, website: create_var2, workers: create_var5 }, this1 { .id, website: create_var10, workers: create_var13 }, this2 { .id, website: create_var18, workers: create_var21 }, this3 { .id, website: create_var26, workers: create_var29 } ] AS data" + RETURN [this0 { .id, website: create_var2, workers: create_var5 }, this1 { .id, website: create_var10, workers: create_var13 }, this2 { .id, website: create_var18, workers: create_var21 }, this3 { .id, website: create_var26, workers: create_var29 }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` diff --git a/packages/graphql/tests/tck/operations/batch/batch-create.test.ts b/packages/graphql/tests/tck/operations/batch/batch-create.test.ts index 7756a64080..d5afd166b7 100644 --- a/packages/graphql/tests/tck/operations/batch/batch-create.test.ts +++ b/packages/graphql/tests/tck/operations/batch/batch-create.test.ts @@ -72,13 +72,13 @@ describe("Batch Create", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`Movie\`) + CREATE (create_this1:Movie) SET create_this1.id = create_var0.id WITH create_this1 CALL { WITH create_this1 - MATCH (create_this1)-[create_this1_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (create_this1)-[create_this1_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(create_this1_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.website must be less than or equal to one', [0]) RETURN c AS create_this1_website_Website_unique_ignored @@ -138,7 +138,7 @@ describe("Batch Create", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`Movie\`) + CREATE (create_this1:Movie) SET create_this1.id = create_var0.id WITH create_this1, create_var0 @@ -146,11 +146,11 @@ describe("Batch Create", () => { WITH create_this1, create_var0 UNWIND create_var0.actors.create AS create_var2 WITH create_var2.node AS create_var3, create_var2.edge AS create_var4, create_this1 - CREATE (create_this5:\`Actor\`) + CREATE (create_this5:Actor) SET create_this5.name = create_var3.name, create_this5.id = randomUUID() - MERGE (create_this1)<-[create_this6:\`ACTED_IN\`]-(create_this5) + MERGE (create_this1)<-[create_this6:ACTED_IN]-(create_this5) SET create_this6.year = create_var4.year WITH create_this5, create_var3 @@ -158,16 +158,16 @@ describe("Batch Create", () => { WITH create_this5, create_var3 UNWIND create_var3.website.create AS create_var7 WITH create_var7.node AS create_var8, create_var7.edge AS create_var9, create_this5 - CREATE (create_this10:\`Website\`) + CREATE (create_this10:Website) SET create_this10.address = create_var8.address - MERGE (create_this5)-[create_this11:\`HAS_WEBSITE\`]->(create_this10) + MERGE (create_this5)-[create_this11:HAS_WEBSITE]->(create_this10) RETURN collect(NULL) AS create_var12 } WITH create_this5 CALL { WITH create_this5 - MATCH (create_this5)-[create_this5_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (create_this5)-[create_this5_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(create_this5_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDActor.website must be less than or equal to one', [0]) RETURN c AS create_this5_website_Website_unique_ignored @@ -179,16 +179,16 @@ describe("Batch Create", () => { WITH create_this1, create_var0 UNWIND create_var0.website.create AS create_var14 WITH create_var14.node AS create_var15, create_var14.edge AS create_var16, create_this1 - CREATE (create_this17:\`Website\`) + CREATE (create_this17:Website) SET create_this17.address = create_var15.address - MERGE (create_this1)-[create_this18:\`HAS_WEBSITE\`]->(create_this17) + MERGE (create_this1)-[create_this18:HAS_WEBSITE]->(create_this17) RETURN collect(NULL) AS create_var19 } WITH create_this1 CALL { WITH create_this1 - MATCH (create_this1)-[create_this1_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (create_this1)-[create_this1_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(create_this1_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.website must be less than or equal to one', [0]) RETURN c AS create_this1_website_Website_unique_ignored @@ -267,7 +267,7 @@ describe("Batch Create", () => { "UNWIND $create_param0 AS create_var4 CALL { WITH create_var4 - CREATE (create_this0:\`Movie\`) + CREATE (create_this0:Movie) SET create_this0.id = create_var4.id WITH create_this0, create_var4 @@ -275,17 +275,17 @@ describe("Batch Create", () => { WITH create_this0, create_var4 UNWIND create_var4.actors.create AS create_var5 WITH create_var5.node AS create_var6, create_var5.edge AS create_var7, create_this0 - CREATE (create_this8:\`Actor\`) + CREATE (create_this8:Actor) SET create_this8.name = create_var6.name, create_this8.id = randomUUID() - MERGE (create_this0)<-[create_this9:\`ACTED_IN\`]-(create_this8) + MERGE (create_this0)<-[create_this9:ACTED_IN]-(create_this8) SET create_this9.year = create_var7.year WITH create_this8 CALL { WITH create_this8 - MATCH (create_this8)-[create_this8_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (create_this8)-[create_this8_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(create_this8_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDActor.website must be less than or equal to one', [0]) RETURN c AS create_this8_website_Website_unique_ignored @@ -295,7 +295,7 @@ describe("Batch Create", () => { WITH create_this0 CALL { WITH create_this0 - MATCH (create_this0)-[create_this0_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (create_this0)-[create_this0_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(create_this0_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.website must be less than or equal to one', [0]) RETURN c AS create_this0_website_Website_unique_ignored @@ -304,7 +304,7 @@ describe("Batch Create", () => { } CALL { WITH create_this0 - MATCH (create_this0)<-[create_this1:\`ACTED_IN\`]-(create_this2:\`Actor\`) + MATCH (create_this0)<-[create_this1:ACTED_IN]-(create_this2:Actor) WITH create_this2 { .name } AS create_this2 RETURN collect(create_this2) AS create_var3 } @@ -393,7 +393,7 @@ describe("Batch Create", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_actors_connect0_node - MERGE (this0)<-[this0_actors_connect0_relationship:\`ACTED_IN\`]-(this0_actors_connect0_node) + MERGE (this0)<-[this0_actors_connect0_relationship:ACTED_IN]-(this0_actors_connect0_node) } } WITH this0, this0_actors_connect0_node @@ -402,7 +402,7 @@ describe("Batch Create", () => { WITH this0 CALL { WITH this0 - MATCH (this0)-[this0_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (this0)-[this0_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(this0_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.website must be less than or equal to one', [0]) RETURN c AS this0_website_Website_unique_ignored @@ -424,7 +424,7 @@ describe("Batch Create", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this1 UNWIND connectedNodes as this1_actors_connect0_node - MERGE (this1)<-[this1_actors_connect0_relationship:\`ACTED_IN\`]-(this1_actors_connect0_node) + MERGE (this1)<-[this1_actors_connect0_relationship:ACTED_IN]-(this1_actors_connect0_node) } } WITH this1, this1_actors_connect0_node @@ -433,7 +433,7 @@ describe("Batch Create", () => { WITH this1 CALL { WITH this1 - MATCH (this1)-[this1_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (this1)-[this1_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(this1_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.website must be less than or equal to one', [0]) RETURN c AS this1_website_Website_unique_ignored @@ -442,17 +442,17 @@ describe("Batch Create", () => { } CALL { WITH this0 - MATCH (this0)<-[create_this0:\`ACTED_IN\`]-(create_this1:\`Actor\`) + MATCH (this0)<-[create_this0:ACTED_IN]-(create_this1:Actor) WITH create_this1 { .name } AS create_this1 RETURN collect(create_this1) AS create_var2 } CALL { WITH this1 - MATCH (this1)<-[create_this3:\`ACTED_IN\`]-(create_this4:\`Actor\`) + MATCH (this1)<-[create_this3:ACTED_IN]-(create_this4:Actor) WITH create_this4 { .name } AS create_this4 RETURN collect(create_this4) AS create_var5 } - RETURN [ this0 { .id, actors: create_var2 }, this1 { .id, actors: create_var5 } ] AS data" + RETURN [this0 { .id, actors: create_var2 }, this1 { .id, actors: create_var5 }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -509,12 +509,12 @@ describe("Batch Create", () => { CREATE (this0_actors0_node:Actor) SET this0_actors0_node.id = randomUUID() SET this0_actors0_node.name = $this0_actors0_node_name - MERGE (this0)<-[this0_actors0_relationship:\`ACTED_IN\`]-(this0_actors0_node) + MERGE (this0)<-[this0_actors0_relationship:ACTED_IN]-(this0_actors0_node) SET this0_actors0_relationship.year = $this0_actors0_relationship_year WITH this0, this0_actors0_node CALL { WITH this0_actors0_node - MATCH (this0_actors0_node)-[this0_actors0_node_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (this0_actors0_node)-[this0_actors0_node_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(this0_actors0_node_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDActor.website must be less than or equal to one', [0]) RETURN c AS this0_actors0_node_website_Website_unique_ignored @@ -522,7 +522,7 @@ describe("Batch Create", () => { WITH this0 CALL { WITH this0 - MATCH (this0)-[this0_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (this0)-[this0_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(this0_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.website must be less than or equal to one', [0]) RETURN c AS this0_website_Website_unique_ignored @@ -536,12 +536,12 @@ describe("Batch Create", () => { CREATE (this1_actors0_node:Actor) SET this1_actors0_node.id = randomUUID() SET this1_actors0_node.name = $this1_actors0_node_name - MERGE (this1)<-[this1_actors0_relationship:\`ACTED_IN\`]-(this1_actors0_node) + MERGE (this1)<-[this1_actors0_relationship:ACTED_IN]-(this1_actors0_node) SET this1_actors0_relationship.year = $this1_actors0_relationship_year WITH this1, this1_actors0_node CALL { WITH this1_actors0_node - MATCH (this1_actors0_node)-[this1_actors0_node_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (this1_actors0_node)-[this1_actors0_node_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(this1_actors0_node_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDActor.website must be less than or equal to one', [0]) RETURN c AS this1_actors0_node_website_Website_unique_ignored @@ -549,7 +549,7 @@ describe("Batch Create", () => { WITH this1 CALL { WITH this1 - MATCH (this1)-[this1_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (this1)-[this1_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(this1_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.website must be less than or equal to one', [0]) RETURN c AS this1_website_Website_unique_ignored @@ -562,11 +562,11 @@ describe("Batch Create", () => { WITH this2 CREATE (this2_website0_node:Website) SET this2_website0_node.address = $this2_website0_node_address - MERGE (this2)-[:\`HAS_WEBSITE\`]->(this2_website0_node) + MERGE (this2)-[:HAS_WEBSITE]->(this2_website0_node) WITH this2 CALL { WITH this2 - MATCH (this2)-[this2_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (this2)-[this2_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(this2_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.website must be less than or equal to one', [0]) RETURN c AS this2_website_Website_unique_ignored @@ -588,7 +588,7 @@ describe("Batch Create", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this3 UNWIND connectedNodes as this3_actors_connect0_node - MERGE (this3)<-[this3_actors_connect0_relationship:\`ACTED_IN\`]-(this3_actors_connect0_node) + MERGE (this3)<-[this3_actors_connect0_relationship:ACTED_IN]-(this3_actors_connect0_node) } } WITH this3, this3_actors_connect0_node @@ -597,7 +597,7 @@ describe("Batch Create", () => { WITH this3 CALL { WITH this3 - MATCH (this3)-[this3_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (this3)-[this3_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(this3_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.website must be less than or equal to one', [0]) RETURN c AS this3_website_Website_unique_ignored @@ -610,16 +610,16 @@ describe("Batch Create", () => { WITH this4 CALL { WITH this4 - MERGE (this4_actors_connectOrCreate0:\`Actor\` { id: $this4_actors_connectOrCreate_param0 }) + MERGE (this4_actors_connectOrCreate0:Actor { id: $this4_actors_connectOrCreate_param0 }) ON CREATE SET this4_actors_connectOrCreate0.name = $this4_actors_connectOrCreate_param1 - MERGE (this4)<-[this4_actors_connectOrCreate_this0:\`ACTED_IN\`]-(this4_actors_connectOrCreate0) + MERGE (this4)<-[this4_actors_connectOrCreate_this0:ACTED_IN]-(this4_actors_connectOrCreate0) RETURN count(*) AS _ } WITH this4 CALL { WITH this4 - MATCH (this4)-[this4_website_Website_unique:\`HAS_WEBSITE\`]->(:Website) + MATCH (this4)-[this4_website_Website_unique:HAS_WEBSITE]->(:Website) WITH count(this4_website_Website_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.website must be less than or equal to one', [0]) RETURN c AS this4_website_Website_unique_ignored @@ -628,65 +628,65 @@ describe("Batch Create", () => { } CALL { WITH this0 - MATCH (this0)-[create_this0:\`HAS_WEBSITE\`]->(create_this1:\`Website\`) + MATCH (this0)-[create_this0:HAS_WEBSITE]->(create_this1:Website) WITH create_this1 { .address } AS create_this1 RETURN head(collect(create_this1)) AS create_var2 } CALL { WITH this0 - MATCH (this0)<-[create_this3:\`ACTED_IN\`]-(create_this4:\`Actor\`) + MATCH (this0)<-[create_this3:ACTED_IN]-(create_this4:Actor) WITH create_this4 { .name } AS create_this4 RETURN collect(create_this4) AS create_var5 } CALL { WITH this1 - MATCH (this1)-[create_this6:\`HAS_WEBSITE\`]->(create_this7:\`Website\`) + MATCH (this1)-[create_this6:HAS_WEBSITE]->(create_this7:Website) WITH create_this7 { .address } AS create_this7 RETURN head(collect(create_this7)) AS create_var8 } CALL { WITH this1 - MATCH (this1)<-[create_this9:\`ACTED_IN\`]-(create_this10:\`Actor\`) + MATCH (this1)<-[create_this9:ACTED_IN]-(create_this10:Actor) WITH create_this10 { .name } AS create_this10 RETURN collect(create_this10) AS create_var11 } CALL { WITH this2 - MATCH (this2)-[create_this12:\`HAS_WEBSITE\`]->(create_this13:\`Website\`) + MATCH (this2)-[create_this12:HAS_WEBSITE]->(create_this13:Website) WITH create_this13 { .address } AS create_this13 RETURN head(collect(create_this13)) AS create_var14 } CALL { WITH this2 - MATCH (this2)<-[create_this15:\`ACTED_IN\`]-(create_this16:\`Actor\`) + MATCH (this2)<-[create_this15:ACTED_IN]-(create_this16:Actor) WITH create_this16 { .name } AS create_this16 RETURN collect(create_this16) AS create_var17 } CALL { WITH this3 - MATCH (this3)-[create_this18:\`HAS_WEBSITE\`]->(create_this19:\`Website\`) + MATCH (this3)-[create_this18:HAS_WEBSITE]->(create_this19:Website) WITH create_this19 { .address } AS create_this19 RETURN head(collect(create_this19)) AS create_var20 } CALL { WITH this3 - MATCH (this3)<-[create_this21:\`ACTED_IN\`]-(create_this22:\`Actor\`) + MATCH (this3)<-[create_this21:ACTED_IN]-(create_this22:Actor) WITH create_this22 { .name } AS create_this22 RETURN collect(create_this22) AS create_var23 } CALL { WITH this4 - MATCH (this4)-[create_this24:\`HAS_WEBSITE\`]->(create_this25:\`Website\`) + MATCH (this4)-[create_this24:HAS_WEBSITE]->(create_this25:Website) WITH create_this25 { .address } AS create_this25 RETURN head(collect(create_this25)) AS create_var26 } CALL { WITH this4 - MATCH (this4)<-[create_this27:\`ACTED_IN\`]-(create_this28:\`Actor\`) + MATCH (this4)<-[create_this27:ACTED_IN]-(create_this28:Actor) WITH create_this28 { .name } AS create_this28 RETURN collect(create_this28) AS create_var29 } - RETURN [ this0 { .id, website: create_var2, actors: create_var5 }, this1 { .id, website: create_var8, actors: create_var11 }, this2 { .id, website: create_var14, actors: create_var17 }, this3 { .id, website: create_var20, actors: create_var23 }, this4 { .id, website: create_var26, actors: create_var29 } ] AS data" + RETURN [this0 { .id, website: create_var2, actors: create_var5 }, this1 { .id, website: create_var8, actors: create_var11 }, this2 { .id, website: create_var14, actors: create_var17 }, this3 { .id, website: create_var20, actors: create_var23 }, this4 { .id, website: create_var26, actors: create_var29 }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` diff --git a/packages/graphql/tests/tck/operations/connect.test.ts b/packages/graphql/tests/tck/operations/connect.test.ts index d51ab20b2e..027c2697c9 100644 --- a/packages/graphql/tests/tck/operations/connect.test.ts +++ b/packages/graphql/tests/tck/operations/connect.test.ts @@ -124,7 +124,7 @@ describe("Cypher Connect", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_colors_connect0_node - MERGE (this0)-[:\`HAS_COLOR\`]->(this0_colors_connect0_node) + MERGE (this0)-[:HAS_COLOR]->(this0_colors_connect0_node) } } WITH this0, this0_colors_connect0_node @@ -139,13 +139,13 @@ describe("Cypher Connect", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0_colors_connect0_node UNWIND connectedNodes as this0_colors_connect0_node_photos0_node - MERGE (this0_colors_connect0_node)<-[:\`OF_COLOR\`]-(this0_colors_connect0_node_photos0_node) + MERGE (this0_colors_connect0_node)<-[:OF_COLOR]-(this0_colors_connect0_node_photos0_node) } } WITH this0, this0_colors_connect0_node, this0_colors_connect0_node_photos0_node CALL { WITH this0_colors_connect0_node_photos0_node - MATCH (this0_colors_connect0_node_photos0_node)-[this0_colors_connect0_node_photos0_node_color_Color_unique:\`OF_COLOR\`]->(:Color) + MATCH (this0_colors_connect0_node_photos0_node)-[this0_colors_connect0_node_photos0_node_color_Color_unique:OF_COLOR]->(:Color) WITH count(this0_colors_connect0_node_photos0_node_color_Color_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDPhoto.color required exactly once', [0]) RETURN c AS this0_colors_connect0_node_photos0_node_color_Color_unique_ignored @@ -162,13 +162,13 @@ describe("Cypher Connect", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0_colors_connect0_node_photos0_node UNWIND connectedNodes as this0_colors_connect0_node_photos0_node_color0_node - MERGE (this0_colors_connect0_node_photos0_node)-[:\`OF_COLOR\`]->(this0_colors_connect0_node_photos0_node_color0_node) + MERGE (this0_colors_connect0_node_photos0_node)-[:OF_COLOR]->(this0_colors_connect0_node_photos0_node_color0_node) } } WITH this0, this0_colors_connect0_node, this0_colors_connect0_node_photos0_node, this0_colors_connect0_node_photos0_node_color0_node CALL { WITH this0_colors_connect0_node_photos0_node - MATCH (this0_colors_connect0_node_photos0_node)-[this0_colors_connect0_node_photos0_node_color_Color_unique:\`OF_COLOR\`]->(:Color) + MATCH (this0_colors_connect0_node_photos0_node)-[this0_colors_connect0_node_photos0_node_color_Color_unique:OF_COLOR]->(:Color) WITH count(this0_colors_connect0_node_photos0_node_color_Color_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDPhoto.color required exactly once', [0]) RETURN c AS this0_colors_connect0_node_photos0_node_color_Color_unique_ignored @@ -192,7 +192,7 @@ describe("Cypher Connect", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_photos_connect0_node - MERGE (this0)-[:\`HAS_PHOTO\`]->(this0_photos_connect0_node) + MERGE (this0)-[:HAS_PHOTO]->(this0_photos_connect0_node) } } WITH this0, this0_photos_connect0_node @@ -207,13 +207,13 @@ describe("Cypher Connect", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0_photos_connect0_node UNWIND connectedNodes as this0_photos_connect0_node_color0_node - MERGE (this0_photos_connect0_node)-[:\`OF_COLOR\`]->(this0_photos_connect0_node_color0_node) + MERGE (this0_photos_connect0_node)-[:OF_COLOR]->(this0_photos_connect0_node_color0_node) } } WITH this0, this0_photos_connect0_node, this0_photos_connect0_node_color0_node CALL { WITH this0_photos_connect0_node - MATCH (this0_photos_connect0_node)-[this0_photos_connect0_node_color_Color_unique:\`OF_COLOR\`]->(:Color) + MATCH (this0_photos_connect0_node)-[this0_photos_connect0_node_color_Color_unique:OF_COLOR]->(:Color) WITH count(this0_photos_connect0_node_color_Color_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDPhoto.color required exactly once', [0]) RETURN c AS this0_photos_connect0_node_color_Color_unique_ignored @@ -235,7 +235,7 @@ describe("Cypher Connect", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_photos_connect1_node - MERGE (this0)-[:\`HAS_PHOTO\`]->(this0_photos_connect1_node) + MERGE (this0)-[:HAS_PHOTO]->(this0_photos_connect1_node) } } WITH this0, this0_photos_connect1_node @@ -250,13 +250,13 @@ describe("Cypher Connect", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0_photos_connect1_node UNWIND connectedNodes as this0_photos_connect1_node_color0_node - MERGE (this0_photos_connect1_node)-[:\`OF_COLOR\`]->(this0_photos_connect1_node_color0_node) + MERGE (this0_photos_connect1_node)-[:OF_COLOR]->(this0_photos_connect1_node_color0_node) } } WITH this0, this0_photos_connect1_node, this0_photos_connect1_node_color0_node CALL { WITH this0_photos_connect1_node - MATCH (this0_photos_connect1_node)-[this0_photos_connect1_node_color_Color_unique:\`OF_COLOR\`]->(:Color) + MATCH (this0_photos_connect1_node)-[this0_photos_connect1_node_color_Color_unique:OF_COLOR]->(:Color) WITH count(this0_photos_connect1_node_color_Color_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDPhoto.color required exactly once', [0]) RETURN c AS this0_photos_connect1_node_color_Color_unique_ignored @@ -268,7 +268,7 @@ describe("Cypher Connect", () => { } RETURN this0 } - RETURN [ this0 { .id } ] AS data" + RETURN [this0 { .id }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` diff --git a/packages/graphql/tests/tck/operations/create.test.ts b/packages/graphql/tests/tck/operations/create.test.ts index d0936e9b33..322008e4ac 100644 --- a/packages/graphql/tests/tck/operations/create.test.ts +++ b/packages/graphql/tests/tck/operations/create.test.ts @@ -61,7 +61,7 @@ describe("Cypher Create", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`Movie\`) + CREATE (create_this1:Movie) SET create_this1.id = create_var0.id RETURN create_this1 @@ -98,7 +98,7 @@ describe("Cypher Create", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`Movie\`) + CREATE (create_this1:Movie) SET create_this1.id = create_var0.id RETURN create_this1 @@ -143,7 +143,7 @@ describe("Cypher Create", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`Movie\`) + CREATE (create_this1:Movie) SET create_this1.id = create_var0.id WITH create_this1, create_var0 @@ -151,10 +151,10 @@ describe("Cypher Create", () => { WITH create_this1, create_var0 UNWIND create_var0.actors.create AS create_var2 WITH create_var2.node AS create_var3, create_var2.edge AS create_var4, create_this1 - CREATE (create_this5:\`Actor\`) + CREATE (create_this5:Actor) SET create_this5.name = create_var3.name - MERGE (create_this1)<-[create_this6:\`ACTED_IN\`]-(create_this5) + MERGE (create_this1)<-[create_this6:ACTED_IN]-(create_this5) RETURN collect(NULL) AS create_var7 } RETURN create_this1 @@ -227,7 +227,7 @@ describe("Cypher Create", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`Movie\`) + CREATE (create_this1:Movie) SET create_this1.id = create_var0.id WITH create_this1, create_var0 @@ -235,19 +235,19 @@ describe("Cypher Create", () => { WITH create_this1, create_var0 UNWIND create_var0.actors.create AS create_var2 WITH create_var2.node AS create_var3, create_var2.edge AS create_var4, create_this1 - CREATE (create_this5:\`Actor\`) + CREATE (create_this5:Actor) SET create_this5.name = create_var3.name - MERGE (create_this1)<-[create_this6:\`ACTED_IN\`]-(create_this5) + MERGE (create_this1)<-[create_this6:ACTED_IN]-(create_this5) WITH create_this5, create_var3 CALL { WITH create_this5, create_var3 UNWIND create_var3.movies.create AS create_var7 WITH create_var7.node AS create_var8, create_var7.edge AS create_var9, create_this5 - CREATE (create_this10:\`Movie\`) + CREATE (create_this10:Movie) SET create_this10.id = create_var8.id - MERGE (create_this5)-[create_this11:\`ACTED_IN\`]->(create_this10) + MERGE (create_this5)-[create_this11:ACTED_IN]->(create_this10) RETURN collect(NULL) AS create_var12 } RETURN collect(NULL) AS create_var13 @@ -337,7 +337,7 @@ describe("Cypher Create", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_actors_connect0_node - MERGE (this0)<-[:\`ACTED_IN\`]-(this0_actors_connect0_node) + MERGE (this0)<-[:ACTED_IN]-(this0_actors_connect0_node) } } WITH this0, this0_actors_connect0_node @@ -345,7 +345,7 @@ describe("Cypher Create", () => { } RETURN this0 } - RETURN [ this0 { .id } ] AS data" + RETURN [this0 { .id }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -396,7 +396,7 @@ describe("Cypher Create", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_movies_connect0_node - MERGE (this0)-[:\`ACTED_IN\`]->(this0_movies_connect0_node) + MERGE (this0)-[:ACTED_IN]->(this0_movies_connect0_node) } } WITH this0, this0_movies_connect0_node @@ -406,10 +406,10 @@ describe("Cypher Create", () => { } CALL { WITH this0 - MATCH (this0)-[create_this0:\`ACTED_IN\`]->(create_this1:\`Movie\`) + MATCH (this0)-[create_this0:ACTED_IN]->(create_this1:Movie) CALL { WITH create_this1 - MATCH (create_this1:\`Movie\`)<-[create_this2:\`ACTED_IN\`]-(create_this3:\`Actor\`) + MATCH (create_this1:Movie)<-[create_this2:ACTED_IN]-(create_this3:Actor) WHERE create_this3.name = $create_param0 WITH { node: { name: create_this3.name } } AS edge WITH collect(edge) AS edges @@ -419,7 +419,7 @@ describe("Cypher Create", () => { WITH create_this1 { actorsConnection: create_var4 } AS create_this1 RETURN collect(create_this1) AS create_var5 } - RETURN [ this0 { .name, movies: create_var5 } ] AS data" + RETURN [this0 { .name, movies: create_var5 }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` diff --git a/packages/graphql/tests/tck/operations/delete.test.ts b/packages/graphql/tests/tck/operations/delete.test.ts index b6bc588118..721eeae8a6 100644 --- a/packages/graphql/tests/tck/operations/delete.test.ts +++ b/packages/graphql/tests/tck/operations/delete.test.ts @@ -57,7 +57,7 @@ describe("Cypher Delete", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.id = $param0 DETACH DELETE this" `); @@ -81,12 +81,12 @@ describe("Cypher Delete", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.id = $param0 WITH * CALL { WITH * - OPTIONAL MATCH (this)<-[this_actors0_relationship:\`ACTED_IN\`]-(this_actors0:Actor) + OPTIONAL MATCH (this)<-[this_actors0_relationship:ACTED_IN]-(this_actors0:Actor) WHERE this_actors0.name = $this_deleteMovies_args_delete_actors0_where_this_actors0param0 WITH this_actors0_relationship, collect(DISTINCT this_actors0) AS this_actors0_to_delete CALL { @@ -141,12 +141,12 @@ describe("Cypher Delete", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.id = $param0 WITH * CALL { WITH * - OPTIONAL MATCH (this)<-[this_actors0_relationship:\`ACTED_IN\`]-(this_actors0:Actor) + OPTIONAL MATCH (this)<-[this_actors0_relationship:ACTED_IN]-(this_actors0:Actor) WHERE this_actors0.name = $this_deleteMovies_args_delete_actors0_where_this_actors0param0 WITH this_actors0_relationship, collect(DISTINCT this_actors0) AS this_actors0_to_delete CALL { @@ -158,7 +158,7 @@ describe("Cypher Delete", () => { WITH * CALL { WITH * - OPTIONAL MATCH (this)<-[this_actors1_relationship:\`ACTED_IN\`]-(this_actors1:Actor) + OPTIONAL MATCH (this)<-[this_actors1_relationship:ACTED_IN]-(this_actors1:Actor) WHERE this_actors1.name = $this_deleteMovies_args_delete_actors1_where_this_actors1param0 WITH this_actors1_relationship, collect(DISTINCT this_actors1) AS this_actors1_to_delete CALL { @@ -221,17 +221,17 @@ describe("Cypher Delete", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.id = $param0 WITH * CALL { WITH * - OPTIONAL MATCH (this)<-[this_actors0_relationship:\`ACTED_IN\`]-(this_actors0:Actor) + OPTIONAL MATCH (this)<-[this_actors0_relationship:ACTED_IN]-(this_actors0:Actor) WHERE this_actors0.name = $this_deleteMovies_args_delete_actors0_where_this_actors0param0 WITH * CALL { WITH * - OPTIONAL MATCH (this_actors0)-[this_actors0_movies0_relationship:\`ACTED_IN\`]->(this_actors0_movies0:Movie) + OPTIONAL MATCH (this_actors0)-[this_actors0_movies0_relationship:ACTED_IN]->(this_actors0_movies0:Movie) WHERE this_actors0_movies0.id = $this_deleteMovies_args_delete_actors0_delete_movies0_where_this_actors0_movies0param0 WITH this_actors0_movies0_relationship, collect(DISTINCT this_actors0_movies0) AS this_actors0_movies0_to_delete CALL { @@ -310,22 +310,22 @@ describe("Cypher Delete", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.id = $param0 WITH * CALL { WITH * - OPTIONAL MATCH (this)<-[this_actors0_relationship:\`ACTED_IN\`]-(this_actors0:Actor) + OPTIONAL MATCH (this)<-[this_actors0_relationship:ACTED_IN]-(this_actors0:Actor) WHERE this_actors0.name = $this_deleteMovies_args_delete_actors0_where_this_actors0param0 WITH * CALL { WITH * - OPTIONAL MATCH (this_actors0)-[this_actors0_movies0_relationship:\`ACTED_IN\`]->(this_actors0_movies0:Movie) + OPTIONAL MATCH (this_actors0)-[this_actors0_movies0_relationship:ACTED_IN]->(this_actors0_movies0:Movie) WHERE this_actors0_movies0.id = $this_deleteMovies_args_delete_actors0_delete_movies0_where_this_actors0_movies0param0 WITH * CALL { WITH * - OPTIONAL MATCH (this_actors0_movies0)<-[this_actors0_movies0_actors0_relationship:\`ACTED_IN\`]-(this_actors0_movies0_actors0:Actor) + OPTIONAL MATCH (this_actors0_movies0)<-[this_actors0_movies0_actors0_relationship:ACTED_IN]-(this_actors0_movies0_actors0:Actor) WHERE this_actors0_movies0_actors0.name = $this_deleteMovies_args_delete_actors0_delete_movies0_delete_actors0_where_this_actors0_movies0_actors0param0 WITH this_actors0_movies0_actors0_relationship, collect(DISTINCT this_actors0_movies0_actors0) AS this_actors0_movies0_actors0_to_delete CALL { diff --git a/packages/graphql/tests/tck/operations/disconnect.test.ts b/packages/graphql/tests/tck/operations/disconnect.test.ts index 70af1dd16d..bfe8c59f7d 100644 --- a/packages/graphql/tests/tck/operations/disconnect.test.ts +++ b/packages/graphql/tests/tck/operations/disconnect.test.ts @@ -106,13 +106,13 @@ describe("Cypher Disconnect", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Product\`) + "MATCH (this:Product) SET this.id = $this_update_id SET this.name = $this_update_name WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_colors0_disconnect0_rel:\`HAS_COLOR\`]->(this_colors0_disconnect0:Color) + OPTIONAL MATCH (this)-[this_colors0_disconnect0_rel:HAS_COLOR]->(this_colors0_disconnect0:Color) WHERE this_colors0_disconnect0.name = $updateProducts_args_update_colors0_disconnect0_where_Color_this_colors0_disconnect0param0 CALL { WITH this_colors0_disconnect0, this_colors0_disconnect0_rel, this @@ -122,7 +122,7 @@ describe("Cypher Disconnect", () => { } CALL { WITH this, this_colors0_disconnect0 - OPTIONAL MATCH (this_colors0_disconnect0)<-[this_colors0_disconnect0_photos0_rel:\`OF_COLOR\`]-(this_colors0_disconnect0_photos0:Photo) + OPTIONAL MATCH (this_colors0_disconnect0)<-[this_colors0_disconnect0_photos0_rel:OF_COLOR]-(this_colors0_disconnect0_photos0:Photo) WHERE this_colors0_disconnect0_photos0.id = $updateProducts_args_update_colors0_disconnect0_disconnect_photos0_where_Photo_this_colors0_disconnect0_photos0param0 CALL { WITH this_colors0_disconnect0_photos0, this_colors0_disconnect0_photos0_rel, this_colors0_disconnect0 @@ -132,7 +132,7 @@ describe("Cypher Disconnect", () => { } CALL { WITH this, this_colors0_disconnect0, this_colors0_disconnect0_photos0 - OPTIONAL MATCH (this_colors0_disconnect0_photos0)-[this_colors0_disconnect0_photos0_color0_rel:\`OF_COLOR\`]->(this_colors0_disconnect0_photos0_color0:Color) + OPTIONAL MATCH (this_colors0_disconnect0_photos0)-[this_colors0_disconnect0_photos0_color0_rel:OF_COLOR]->(this_colors0_disconnect0_photos0_color0:Color) WHERE this_colors0_disconnect0_photos0_color0.id = $updateProducts_args_update_colors0_disconnect0_disconnect_photos_disconnect_color_where_Color_this_colors0_disconnect0_photos0_color0param0 CALL { WITH this_colors0_disconnect0_photos0_color0, this_colors0_disconnect0_photos0_color0_rel, this_colors0_disconnect0_photos0 @@ -149,7 +149,7 @@ describe("Cypher Disconnect", () => { WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_photos0_disconnect0_rel:\`HAS_PHOTO\`]->(this_photos0_disconnect0:Photo) + OPTIONAL MATCH (this)-[this_photos0_disconnect0_rel:HAS_PHOTO]->(this_photos0_disconnect0:Photo) WHERE this_photos0_disconnect0.id = $updateProducts_args_update_photos0_disconnect0_where_Photo_this_photos0_disconnect0param0 CALL { WITH this_photos0_disconnect0, this_photos0_disconnect0_rel, this @@ -159,7 +159,7 @@ describe("Cypher Disconnect", () => { } CALL { WITH this, this_photos0_disconnect0 - OPTIONAL MATCH (this_photos0_disconnect0)-[this_photos0_disconnect0_color0_rel:\`OF_COLOR\`]->(this_photos0_disconnect0_color0:Color) + OPTIONAL MATCH (this_photos0_disconnect0)-[this_photos0_disconnect0_color0_rel:OF_COLOR]->(this_photos0_disconnect0_color0:Color) WHERE this_photos0_disconnect0_color0.name = $updateProducts_args_update_photos0_disconnect_disconnect_color_where_Color_this_photos0_disconnect0_color0param0 CALL { WITH this_photos0_disconnect0_color0, this_photos0_disconnect0_color0_rel, this_photos0_disconnect0 @@ -174,7 +174,7 @@ describe("Cypher Disconnect", () => { WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_photos0_disconnect1_rel:\`HAS_PHOTO\`]->(this_photos0_disconnect1:Photo) + OPTIONAL MATCH (this)-[this_photos0_disconnect1_rel:HAS_PHOTO]->(this_photos0_disconnect1:Photo) WHERE this_photos0_disconnect1.id = $updateProducts_args_update_photos0_disconnect1_where_Photo_this_photos0_disconnect1param0 CALL { WITH this_photos0_disconnect1, this_photos0_disconnect1_rel, this @@ -184,7 +184,7 @@ describe("Cypher Disconnect", () => { } CALL { WITH this, this_photos0_disconnect1 - OPTIONAL MATCH (this_photos0_disconnect1)-[this_photos0_disconnect1_color0_rel:\`OF_COLOR\`]->(this_photos0_disconnect1_color0:Color) + OPTIONAL MATCH (this_photos0_disconnect1)-[this_photos0_disconnect1_color0_rel:OF_COLOR]->(this_photos0_disconnect1_color0:Color) WHERE this_photos0_disconnect1_color0.name = $updateProducts_args_update_photos0_disconnect_disconnect_color_where_Color_this_photos0_disconnect1_color0param0 CALL { WITH this_photos0_disconnect1_color0, this_photos0_disconnect1_color0_rel, this_photos0_disconnect1 diff --git a/packages/graphql/tests/tck/operations/update.test.ts b/packages/graphql/tests/tck/operations/update.test.ts index 44631bbda5..78970b17e8 100644 --- a/packages/graphql/tests/tck/operations/update.test.ts +++ b/packages/graphql/tests/tck/operations/update.test.ts @@ -63,7 +63,7 @@ describe("Cypher Update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.id = $param0 SET this.id = $this_update_id RETURN collect(DISTINCT this { .id }) AS data" @@ -97,12 +97,12 @@ describe("Cypher Update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.id = $param0 WITH this CALL { WITH this - MATCH (this)<-[this_acted_in0_relationship:\`ACTED_IN\`]-(this_actors0:Actor) + MATCH (this)<-[this_acted_in0_relationship:ACTED_IN]-(this_actors0:Actor) WHERE this_actors0.name = $updateMovies_args_update_actors0_where_this_actors0param0 SET this_actors0.name = $this_update_actors0_name RETURN count(*) AS update_this_actors0 @@ -174,18 +174,18 @@ describe("Cypher Update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.id = $param0 WITH this CALL { WITH this - MATCH (this)<-[this_acted_in0_relationship:\`ACTED_IN\`]-(this_actors0:Actor) + MATCH (this)<-[this_acted_in0_relationship:ACTED_IN]-(this_actors0:Actor) WHERE this_actors0.name = $updateMovies_args_update_actors0_where_this_actors0param0 SET this_actors0.name = $this_update_actors0_name WITH this, this_actors0 CALL { WITH this, this_actors0 - MATCH (this_actors0)-[this_actors0_acted_in0_relationship:\`ACTED_IN\`]->(this_actors0_movies0:Movie) + MATCH (this_actors0)-[this_actors0_acted_in0_relationship:ACTED_IN]->(this_actors0_movies0:Movie) WHERE this_actors0_movies0.id = $updateMovies_args_update_actors0_update_node_movies0_where_this_actors0_movies0param0 SET this_actors0_movies0.title = $this_update_actors0_movies0_title RETURN count(*) AS update_this_actors0_movies0 @@ -255,7 +255,7 @@ describe("Cypher Update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.id = $param0 WITH this CALL { @@ -269,7 +269,7 @@ describe("Cypher Update", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_actors0_node - MERGE (this)<-[this_connect_actors0_relationship:\`ACTED_IN\`]-(this_connect_actors0_node) + MERGE (this)<-[this_connect_actors0_relationship:ACTED_IN]-(this_connect_actors0_node) } } WITH this, this_connect_actors0_node @@ -307,7 +307,7 @@ describe("Cypher Update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.id = $param0 WITH this CALL { @@ -321,7 +321,7 @@ describe("Cypher Update", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_actors0_node - MERGE (this)<-[this_connect_actors0_relationship:\`ACTED_IN\`]-(this_connect_actors0_node) + MERGE (this)<-[this_connect_actors0_relationship:ACTED_IN]-(this_connect_actors0_node) } } WITH this, this_connect_actors0_node @@ -339,7 +339,7 @@ describe("Cypher Update", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_actors1_node - MERGE (this)<-[this_connect_actors1_relationship:\`ACTED_IN\`]-(this_connect_actors1_node) + MERGE (this)<-[this_connect_actors1_relationship:ACTED_IN]-(this_connect_actors1_node) } } WITH this, this_connect_actors1_node @@ -373,12 +373,12 @@ describe("Cypher Update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.id = $param0 WITH this CALL { WITH this - OPTIONAL MATCH (this)<-[this_disconnect_actors0_rel:\`ACTED_IN\`]-(this_disconnect_actors0:Actor) + OPTIONAL MATCH (this)<-[this_disconnect_actors0_rel:ACTED_IN]-(this_disconnect_actors0:Actor) WHERE this_disconnect_actors0.name = $updateMovies_args_disconnect_actors0_where_Actor_this_disconnect_actors0param0 CALL { WITH this_disconnect_actors0, this_disconnect_actors0_rel, this @@ -435,12 +435,12 @@ describe("Cypher Update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.id = $param0 WITH this CALL { WITH this - OPTIONAL MATCH (this)<-[this_disconnect_actors0_rel:\`ACTED_IN\`]-(this_disconnect_actors0:Actor) + OPTIONAL MATCH (this)<-[this_disconnect_actors0_rel:ACTED_IN]-(this_disconnect_actors0:Actor) WHERE this_disconnect_actors0.name = $updateMovies_args_disconnect_actors0_where_Actor_this_disconnect_actors0param0 CALL { WITH this_disconnect_actors0, this_disconnect_actors0_rel, this @@ -453,7 +453,7 @@ describe("Cypher Update", () => { WITH this CALL { WITH this - OPTIONAL MATCH (this)<-[this_disconnect_actors1_rel:\`ACTED_IN\`]-(this_disconnect_actors1:Actor) + OPTIONAL MATCH (this)<-[this_disconnect_actors1_rel:ACTED_IN]-(this_disconnect_actors1:Actor) WHERE this_disconnect_actors1.name = $updateMovies_args_disconnect_actors1_where_Actor_this_disconnect_actors1param0 CALL { WITH this_disconnect_actors1, this_disconnect_actors1_rel, this @@ -520,17 +520,17 @@ describe("Cypher Update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WHERE this.name = $param0 WITH this CREATE (this_movies0_create0_node:Movie) SET this_movies0_create0_node.id = $this_movies0_create0_node_id SET this_movies0_create0_node.title = $this_movies0_create0_node_title - MERGE (this)-[:\`ACTED_IN\`]->(this_movies0_create0_node) + MERGE (this)-[:ACTED_IN]->(this_movies0_create0_node) WITH * CALL { WITH this - MATCH (this)-[update_this0:\`ACTED_IN\`]->(update_this1:\`Movie\`) + MATCH (this)-[update_this0:ACTED_IN]->(update_this1:Movie) WITH update_this1 { .id, .title } AS update_this1 RETURN collect(update_this1) AS update_var2 } @@ -568,16 +568,16 @@ describe("Cypher Update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WHERE this.name = $param0 CREATE (this_create_movies0_node:Movie) SET this_create_movies0_node.id = $this_create_movies0_node_id SET this_create_movies0_node.title = $this_create_movies0_node_title - MERGE (this)-[this_create_movies0_relationship:\`ACTED_IN\`]->(this_create_movies0_node) + MERGE (this)-[this_create_movies0_relationship:ACTED_IN]->(this_create_movies0_node) WITH * CALL { WITH this - MATCH (this)-[update_this0:\`ACTED_IN\`]->(update_this1:\`Movie\`) + MATCH (this)-[update_this0:ACTED_IN]->(update_this1:Movie) WITH update_this1 { .id, .title } AS update_this1 RETURN collect(update_this1) AS update_var2 } @@ -620,20 +620,20 @@ describe("Cypher Update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) WHERE this.name = $param0 CREATE (this_create_movies0_node:Movie) SET this_create_movies0_node.id = $this_create_movies0_node_id SET this_create_movies0_node.title = $this_create_movies0_node_title - MERGE (this)-[this_create_movies0_relationship:\`ACTED_IN\`]->(this_create_movies0_node) + MERGE (this)-[this_create_movies0_relationship:ACTED_IN]->(this_create_movies0_node) CREATE (this_create_movies1_node:Movie) SET this_create_movies1_node.id = $this_create_movies1_node_id SET this_create_movies1_node.title = $this_create_movies1_node_title - MERGE (this)-[this_create_movies1_relationship:\`ACTED_IN\`]->(this_create_movies1_node) + MERGE (this)-[this_create_movies1_relationship:ACTED_IN]->(this_create_movies1_node) WITH * CALL { WITH this - MATCH (this)-[update_this0:\`ACTED_IN\`]->(update_this1:\`Movie\`) + MATCH (this)-[update_this0:ACTED_IN]->(update_this1:Movie) WITH update_this1 { .id, .title } AS update_this1 RETURN collect(update_this1) AS update_var2 } @@ -669,12 +669,12 @@ describe("Cypher Update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.id = $param0 WITH * CALL { WITH * - OPTIONAL MATCH (this)<-[this_delete_actors0_relationship:\`ACTED_IN\`]-(this_delete_actors0:Actor) + OPTIONAL MATCH (this)<-[this_delete_actors0_relationship:ACTED_IN]-(this_delete_actors0:Actor) WHERE (this_delete_actors0_relationship.screenTime = $updateMovies_args_delete_actors0_where_this_delete_actors0param0 AND this_delete_actors0.name = $updateMovies_args_delete_actors0_where_this_delete_actors0param1) WITH this_delete_actors0_relationship, collect(DISTINCT this_delete_actors0) AS this_delete_actors0_to_delete CALL { @@ -744,12 +744,12 @@ describe("Cypher Update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.id = $param0 WITH * CALL { WITH * - OPTIONAL MATCH (this)<-[this_delete_actors0_relationship:\`ACTED_IN\`]-(this_delete_actors0:Actor) + OPTIONAL MATCH (this)<-[this_delete_actors0_relationship:ACTED_IN]-(this_delete_actors0:Actor) WHERE this_delete_actors0.name = $updateMovies_args_delete_actors0_where_this_delete_actors0param0 WITH this_delete_actors0_relationship, collect(DISTINCT this_delete_actors0) AS this_delete_actors0_to_delete CALL { @@ -761,7 +761,7 @@ describe("Cypher Update", () => { WITH this CALL { WITH this - MATCH (this)<-[this_acted_in0_relationship:\`ACTED_IN\`]-(this_actors0:Actor) + MATCH (this)<-[this_acted_in0_relationship:ACTED_IN]-(this_actors0:Actor) WHERE this_actors0.name = $updateMovies_args_update_actors0_where_this_actors0param0 SET this_actors0.name = $this_update_actors0_name RETURN count(*) AS update_this_actors0 @@ -829,12 +829,12 @@ describe("Cypher Update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.id = $param0 WITH * CALL { WITH * - OPTIONAL MATCH (this)<-[this_actors0_delete0_relationship:\`ACTED_IN\`]-(this_actors0_delete0:Actor) + OPTIONAL MATCH (this)<-[this_actors0_delete0_relationship:ACTED_IN]-(this_actors0_delete0:Actor) WHERE this_actors0_delete0.name = $updateMovies_args_update_actors0_delete0_where_this_actors0_delete0param0 WITH this_actors0_delete0_relationship, collect(DISTINCT this_actors0_delete0) AS this_actors0_delete0_to_delete CALL { @@ -898,17 +898,17 @@ describe("Cypher Update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.id = $param0 WITH * CALL { WITH * - OPTIONAL MATCH (this)<-[this_actors0_delete0_relationship:\`ACTED_IN\`]-(this_actors0_delete0:Actor) + OPTIONAL MATCH (this)<-[this_actors0_delete0_relationship:ACTED_IN]-(this_actors0_delete0:Actor) WHERE this_actors0_delete0.name = $updateMovies_args_update_actors0_delete0_where_this_actors0_delete0param0 WITH * CALL { WITH * - OPTIONAL MATCH (this_actors0_delete0)-[this_actors0_delete0_movies0_relationship:\`ACTED_IN\`]->(this_actors0_delete0_movies0:Movie) + OPTIONAL MATCH (this_actors0_delete0)-[this_actors0_delete0_movies0_relationship:ACTED_IN]->(this_actors0_delete0_movies0:Movie) WHERE this_actors0_delete0_movies0.id = $updateMovies_args_update_actors0_delete0_delete_movies0_where_this_actors0_delete0_movies0param0 WITH this_actors0_delete0_movies0_relationship, collect(DISTINCT this_actors0_delete0_movies0) AS this_actors0_delete0_movies0_to_delete CALL { diff --git a/packages/graphql/tests/tck/pagination.test.ts b/packages/graphql/tests/tck/pagination.test.ts index df900f24c2..81179add78 100644 --- a/packages/graphql/tests/tck/pagination.test.ts +++ b/packages/graphql/tests/tck/pagination.test.ts @@ -51,7 +51,7 @@ describe("Cypher pagination tests", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WITH * SKIP $param0 RETURN this { .title } AS this" @@ -79,7 +79,7 @@ describe("Cypher pagination tests", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WITH * LIMIT $param0 RETURN this { .title } AS this" @@ -107,7 +107,7 @@ describe("Cypher pagination tests", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WITH * SKIP $param0 LIMIT $param1 @@ -142,7 +142,7 @@ describe("Cypher pagination tests", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WITH * SKIP $param0 LIMIT $param1 @@ -177,7 +177,7 @@ describe("Cypher pagination tests", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 WITH * SKIP $param1 diff --git a/packages/graphql/tests/tck/pringles.test.ts b/packages/graphql/tests/tck/pringles.test.ts index 8ae4f50c74..9cd215624b 100644 --- a/packages/graphql/tests/tck/pringles.test.ts +++ b/packages/graphql/tests/tck/pringles.test.ts @@ -116,32 +116,32 @@ describe("Cypher Create Pringles", () => { CREATE (this0_sizes0_node:Size) SET this0_sizes0_node.id = $this0_sizes0_node_id SET this0_sizes0_node.name = $this0_sizes0_node_name - MERGE (this0)-[:\`HAS_SIZE\`]->(this0_sizes0_node) + MERGE (this0)-[:HAS_SIZE]->(this0_sizes0_node) WITH this0 CREATE (this0_sizes1_node:Size) SET this0_sizes1_node.id = $this0_sizes1_node_id SET this0_sizes1_node.name = $this0_sizes1_node_name - MERGE (this0)-[:\`HAS_SIZE\`]->(this0_sizes1_node) + MERGE (this0)-[:HAS_SIZE]->(this0_sizes1_node) WITH this0 CREATE (this0_colors0_node:Color) SET this0_colors0_node.id = $this0_colors0_node_id SET this0_colors0_node.name = $this0_colors0_node_name - MERGE (this0)-[:\`HAS_COLOR\`]->(this0_colors0_node) + MERGE (this0)-[:HAS_COLOR]->(this0_colors0_node) WITH this0 CREATE (this0_colors1_node:Color) SET this0_colors1_node.id = $this0_colors1_node_id SET this0_colors1_node.name = $this0_colors1_node_name - MERGE (this0)-[:\`HAS_COLOR\`]->(this0_colors1_node) + MERGE (this0)-[:HAS_COLOR]->(this0_colors1_node) WITH this0 CREATE (this0_photos0_node:Photo) SET this0_photos0_node.id = $this0_photos0_node_id SET this0_photos0_node.description = $this0_photos0_node_description SET this0_photos0_node.url = $this0_photos0_node_url - MERGE (this0)-[:\`HAS_PHOTO\`]->(this0_photos0_node) + MERGE (this0)-[:HAS_PHOTO]->(this0_photos0_node) WITH this0, this0_photos0_node CALL { WITH this0_photos0_node - MATCH (this0_photos0_node)-[this0_photos0_node_color_Color_unique:\`OF_COLOR\`]->(:Color) + MATCH (this0_photos0_node)-[this0_photos0_node_color_Color_unique:OF_COLOR]->(:Color) WITH count(this0_photos0_node_color_Color_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDPhoto.color required exactly once', [0]) RETURN c AS this0_photos0_node_color_Color_unique_ignored @@ -163,17 +163,17 @@ describe("Cypher Create Pringles", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0_photos1_node UNWIND connectedNodes as this0_photos1_node_color_connect0_node - MERGE (this0_photos1_node)-[:\`OF_COLOR\`]->(this0_photos1_node_color_connect0_node) + MERGE (this0_photos1_node)-[:OF_COLOR]->(this0_photos1_node_color_connect0_node) } } WITH this0, this0_photos1_node, this0_photos1_node_color_connect0_node RETURN count(*) AS connect_this0_photos1_node_color_connect_Color } - MERGE (this0)-[:\`HAS_PHOTO\`]->(this0_photos1_node) + MERGE (this0)-[:HAS_PHOTO]->(this0_photos1_node) WITH this0, this0_photos1_node CALL { WITH this0_photos1_node - MATCH (this0_photos1_node)-[this0_photos1_node_color_Color_unique:\`OF_COLOR\`]->(:Color) + MATCH (this0_photos1_node)-[this0_photos1_node_color_Color_unique:OF_COLOR]->(:Color) WITH count(this0_photos1_node_color_Color_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDPhoto.color required exactly once', [0]) RETURN c AS this0_photos1_node_color_Color_unique_ignored @@ -195,24 +195,24 @@ describe("Cypher Create Pringles", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0_photos2_node UNWIND connectedNodes as this0_photos2_node_color_connect0_node - MERGE (this0_photos2_node)-[:\`OF_COLOR\`]->(this0_photos2_node_color_connect0_node) + MERGE (this0_photos2_node)-[:OF_COLOR]->(this0_photos2_node_color_connect0_node) } } WITH this0, this0_photos2_node, this0_photos2_node_color_connect0_node RETURN count(*) AS connect_this0_photos2_node_color_connect_Color } - MERGE (this0)-[:\`HAS_PHOTO\`]->(this0_photos2_node) + MERGE (this0)-[:HAS_PHOTO]->(this0_photos2_node) WITH this0, this0_photos2_node CALL { WITH this0_photos2_node - MATCH (this0_photos2_node)-[this0_photos2_node_color_Color_unique:\`OF_COLOR\`]->(:Color) + MATCH (this0_photos2_node)-[this0_photos2_node_color_Color_unique:OF_COLOR]->(:Color) WITH count(this0_photos2_node_color_Color_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDPhoto.color required exactly once', [0]) RETURN c AS this0_photos2_node_color_Color_unique_ignored } RETURN this0 } - RETURN [ this0 { .id } ] AS data" + RETURN [this0 { .id }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -275,18 +275,18 @@ describe("Cypher Create Pringles", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Product\`) + "MATCH (this:Product) WHERE this.name = $param0 WITH this CALL { WITH this - MATCH (this)-[this_has_photo0_relationship:\`HAS_PHOTO\`]->(this_photos0:Photo) + MATCH (this)-[this_has_photo0_relationship:HAS_PHOTO]->(this_photos0:Photo) WHERE this_photos0.description = $updateProducts_args_update_photos0_where_this_photos0param0 SET this_photos0.description = $this_update_photos0_description WITH this, this_photos0 CALL { WITH this, this_photos0 - OPTIONAL MATCH (this_photos0)-[this_photos0_color0_disconnect0_rel:\`OF_COLOR\`]->(this_photos0_color0_disconnect0:Color) + OPTIONAL MATCH (this_photos0)-[this_photos0_color0_disconnect0_rel:OF_COLOR]->(this_photos0_color0_disconnect0:Color) WHERE this_photos0_color0_disconnect0.name = $updateProducts_args_update_photos0_update_node_color_disconnect_where_Color_this_photos0_color0_disconnect0param0 CALL { WITH this_photos0_color0_disconnect0, this_photos0_color0_disconnect0_rel, this_photos0 @@ -308,7 +308,7 @@ describe("Cypher Create Pringles", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this_photos0 UNWIND connectedNodes as this_photos0_color0_connect0_node - MERGE (this_photos0)-[:\`OF_COLOR\`]->(this_photos0_color0_connect0_node) + MERGE (this_photos0)-[:OF_COLOR]->(this_photos0_color0_connect0_node) } } WITH this, this_photos0, this_photos0_color0_connect0_node @@ -317,7 +317,7 @@ describe("Cypher Create Pringles", () => { WITH this, this_photos0 CALL { WITH this_photos0 - MATCH (this_photos0)-[this_photos0_color_Color_unique:\`OF_COLOR\`]->(:Color) + MATCH (this_photos0)-[this_photos0_color_Color_unique:OF_COLOR]->(:Color) WITH count(this_photos0_color_Color_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDPhoto.color required exactly once', [0]) RETURN c AS this_photos0_color_Color_unique_ignored diff --git a/packages/graphql/tests/tck/projection.test.ts b/packages/graphql/tests/tck/projection.test.ts index 584cd32272..52823f19a0 100644 --- a/packages/graphql/tests/tck/projection.test.ts +++ b/packages/graphql/tests/tck/projection.test.ts @@ -92,14 +92,14 @@ describe("Cypher Projection", () => { "UNWIND $create_param3 AS create_var10 CALL { WITH create_var10 - CREATE (create_this0:\`Product\`) + CREATE (create_this0:Product) SET create_this0.id = create_var10.id RETURN create_this0 } CALL { WITH create_this0 - MATCH (create_this0)-[create_this1:\`HAS_PHOTO\`]->(create_this2:\`Photo\`) + MATCH (create_this0)-[create_this1:HAS_PHOTO]->(create_this2:Photo) WHERE create_this2.url = $create_param0 WITH create_this2 { .url, location: CASE WHEN create_this2.location IS NOT NULL THEN { point: create_this2.location } @@ -109,14 +109,14 @@ describe("Cypher Projection", () => { } CALL { WITH create_this0 - MATCH (create_this0)-[create_this4:\`HAS_COLOR\`]->(create_this5:\`Color\`) + MATCH (create_this0)-[create_this4:HAS_COLOR]->(create_this5:Color) WHERE create_this5.id = $create_param1 WITH create_this5 { .id } AS create_this5 RETURN collect(create_this5) AS create_var6 } CALL { WITH create_this0 - MATCH (create_this0)-[create_this7:\`HAS_SIZE\`]->(create_this8:\`Size\`) + MATCH (create_this0)-[create_this7:HAS_SIZE]->(create_this8:Size) WHERE create_this8.name = $create_param2 WITH create_this8 { .name } AS create_this8 RETURN collect(create_this8) AS create_var9 diff --git a/packages/graphql/tests/tck/rfcs/query-limits.test.ts b/packages/graphql/tests/tck/rfcs/query-limits.test.ts index c8dcf5edad..f80af7f543 100644 --- a/packages/graphql/tests/tck/rfcs/query-limits.test.ts +++ b/packages/graphql/tests/tck/rfcs/query-limits.test.ts @@ -65,7 +65,7 @@ describe("tck/rfcs/query-limits", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WITH * LIMIT $param0 RETURN this { .id } AS this" @@ -93,7 +93,7 @@ describe("tck/rfcs/query-limits", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Show\`) + "MATCH (this:Show) WITH * LIMIT $param0 RETURN this { .id } AS this" @@ -121,7 +121,7 @@ describe("tck/rfcs/query-limits", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Show\`) + "MATCH (this:Show) WITH * LIMIT $param0 RETURN this { .id } AS this" @@ -154,12 +154,12 @@ describe("tck/rfcs/query-limits", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WITH * LIMIT $param0 CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Person\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Person) WITH this1 { .id } AS this1 LIMIT $param1 RETURN collect(this1) AS var2 @@ -200,12 +200,12 @@ describe("tck/rfcs/query-limits", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WITH * LIMIT $param0 CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Person\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Person) WITH { node: { id: this1.id } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount @@ -255,12 +255,12 @@ describe("tck/rfcs/query-limits", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WITH * LIMIT $param0 CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Person\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Person) WITH { node: { id: this1.id } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount @@ -310,10 +310,10 @@ describe("tck/rfcs/query-limits", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Festival\`) + "MATCH (this:Festival) CALL { WITH this - MATCH (this)<-[this0:\`PART_OF\`]-(this1:\`Show\`) + MATCH (this)<-[this0:PART_OF]-(this1:Show) WITH { node: { id: this1.id } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount @@ -355,12 +355,12 @@ describe("tck/rfcs/query-limits", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WITH * LIMIT $param0 CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Person\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Person) WITH this1 { .id } AS this1 LIMIT $param1 RETURN collect(this1) AS var2 diff --git a/packages/graphql/tests/tck/rfcs/rfc-003.test.ts b/packages/graphql/tests/tck/rfcs/rfc-003.test.ts index 6ce00c3a69..0d3e84d248 100644 --- a/packages/graphql/tests/tck/rfcs/rfc-003.test.ts +++ b/packages/graphql/tests/tck/rfcs/rfc-003.test.ts @@ -56,13 +56,13 @@ describe("tck/rfs/003", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`Movie\`) + CREATE (create_this1:Movie) SET create_this1.id = create_var0.id WITH create_this1 CALL { WITH create_this1 - MATCH (create_this1)<-[create_this1_director_Director_unique:\`DIRECTED\`]-(:Director) + MATCH (create_this1)<-[create_this1_director_Director_unique:DIRECTED]-(:Director) WITH count(create_this1_director_Director_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.director required exactly once', [0]) RETURN c AS create_this1_director_Director_unique_ignored @@ -116,13 +116,13 @@ describe("tck/rfs/003", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`Movie\`) + CREATE (create_this1:Movie) SET create_this1.id = create_var0.id WITH create_this1 CALL { WITH create_this1 - MATCH (create_this1)<-[create_this1_director_Director_unique:\`DIRECTED\`]-(:Director) + MATCH (create_this1)<-[create_this1_director_Director_unique:DIRECTED]-(:Director) WITH count(create_this1_director_Director_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.director must be less than or equal to one', [0]) RETURN c AS create_this1_director_Director_unique_ignored @@ -183,7 +183,7 @@ describe("tck/rfs/003", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`Movie\`) + CREATE (create_this1:Movie) SET create_this1.id = create_var0.id WITH create_this1, create_var0 @@ -191,14 +191,14 @@ describe("tck/rfs/003", () => { WITH create_this1, create_var0 UNWIND create_var0.director.create AS create_var2 WITH create_var2.node AS create_var3, create_var2.edge AS create_var4, create_this1 - CREATE (create_this5:\`Director\`) + CREATE (create_this5:Director) SET create_this5.id = create_var3.id - MERGE (create_this1)<-[create_this6:\`DIRECTED\`]-(create_this5) + MERGE (create_this1)<-[create_this6:DIRECTED]-(create_this5) WITH create_this5 CALL { WITH create_this5 - MATCH (create_this5)-[create_this5_address_Address_unique:\`HAS_ADDRESS\`]->(:Address) + MATCH (create_this5)-[create_this5_address_Address_unique:HAS_ADDRESS]->(:Address) WITH count(create_this5_address_Address_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDDirector.address required exactly once', [0]) RETURN c AS create_this5_address_Address_unique_ignored @@ -208,7 +208,7 @@ describe("tck/rfs/003", () => { WITH create_this1 CALL { WITH create_this1 - MATCH (create_this1)<-[create_this1_director_Director_unique:\`DIRECTED\`]-(:Director) + MATCH (create_this1)<-[create_this1_director_Director_unique:DIRECTED]-(:Director) WITH count(create_this1_director_Director_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.director required exactly once', [0]) RETURN c AS create_this1_director_Director_unique_ignored @@ -275,7 +275,7 @@ describe("tck/rfs/003", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`Movie\`) + CREATE (create_this1:Movie) SET create_this1.id = create_var0.id WITH create_this1, create_var0 @@ -283,14 +283,14 @@ describe("tck/rfs/003", () => { WITH create_this1, create_var0 UNWIND create_var0.director.create AS create_var2 WITH create_var2.node AS create_var3, create_var2.edge AS create_var4, create_this1 - CREATE (create_this5:\`Director\`) + CREATE (create_this5:Director) SET create_this5.id = create_var3.id - MERGE (create_this1)<-[create_this6:\`DIRECTED\`]-(create_this5) + MERGE (create_this1)<-[create_this6:DIRECTED]-(create_this5) WITH create_this5 CALL { WITH create_this5 - MATCH (create_this5)-[create_this5_address_Address_unique:\`HAS_ADDRESS\`]->(:Address) + MATCH (create_this5)-[create_this5_address_Address_unique:HAS_ADDRESS]->(:Address) WITH count(create_this5_address_Address_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDDirector.address must be less than or equal to one', [0]) RETURN c AS create_this5_address_Address_unique_ignored @@ -300,7 +300,7 @@ describe("tck/rfs/003", () => { WITH create_this1 CALL { WITH create_this1 - MATCH (create_this1)<-[create_this1_director_Director_unique:\`DIRECTED\`]-(:Director) + MATCH (create_this1)<-[create_this1_director_Director_unique:DIRECTED]-(:Director) WITH count(create_this1_director_Director_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.director must be less than or equal to one', [0]) RETURN c AS create_this1_director_Director_unique_ignored @@ -360,13 +360,13 @@ describe("tck/rfs/003", () => { const result = await translateQuery(neoSchema, mutation); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.id = $param0 SET this.id = $this_update_id WITH * CALL { WITH this - MATCH (this)<-[this_director_Director_unique:\`DIRECTED\`]-(:Director) + MATCH (this)<-[this_director_Director_unique:DIRECTED]-(:Director) WITH count(this_director_Director_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.director required exactly once', [0]) RETURN c AS this_director_Director_unique_ignored @@ -412,13 +412,13 @@ describe("tck/rfs/003", () => { const result = await translateQuery(neoSchema, mutation); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.id = $param0 SET this.id = $this_update_id WITH * CALL { WITH this - MATCH (this)<-[this_director_Director_unique:\`DIRECTED\`]-(:Director) + MATCH (this)<-[this_director_Director_unique:DIRECTED]-(:Director) WITH count(this_director_Director_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.director must be less than or equal to one', [0]) RETURN c AS this_director_Director_unique_ignored @@ -474,17 +474,17 @@ describe("tck/rfs/003", () => { const result = await translateQuery(neoSchema, mutation); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.id = $param0 WITH this CALL { WITH this - MATCH (this)<-[this_directed0_relationship:\`DIRECTED\`]-(this_director0:Director) + MATCH (this)<-[this_directed0_relationship:DIRECTED]-(this_director0:Director) SET this_director0.id = $this_update_director0_id WITH this, this_director0 CALL { WITH this_director0 - MATCH (this_director0)-[this_director0_address_Address_unique:\`HAS_ADDRESS\`]->(:Address) + MATCH (this_director0)-[this_director0_address_Address_unique:HAS_ADDRESS]->(:Address) WITH count(this_director0_address_Address_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDDirector.address required exactly once', [0]) RETURN c AS this_director0_address_Address_unique_ignored @@ -494,7 +494,7 @@ describe("tck/rfs/003", () => { WITH * CALL { WITH this - MATCH (this)<-[this_director_Director_unique:\`DIRECTED\`]-(:Director) + MATCH (this)<-[this_director_Director_unique:DIRECTED]-(:Director) WITH count(this_director_Director_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.director required exactly once', [0]) RETURN c AS this_director_Director_unique_ignored @@ -549,17 +549,17 @@ describe("tck/rfs/003", () => { const result = await translateQuery(neoSchema, mutation); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.id = $param0 WITH this CALL { WITH this - MATCH (this)<-[this_directed0_relationship:\`DIRECTED\`]-(this_director0:Director) + MATCH (this)<-[this_directed0_relationship:DIRECTED]-(this_director0:Director) SET this_director0.id = $this_update_director0_id WITH this, this_director0 CALL { WITH this_director0 - MATCH (this_director0)-[this_director0_address_Address_unique:\`HAS_ADDRESS\`]->(:Address) + MATCH (this_director0)-[this_director0_address_Address_unique:HAS_ADDRESS]->(:Address) WITH count(this_director0_address_Address_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDDirector.address must be less than or equal to one', [0]) RETURN c AS this_director0_address_Address_unique_ignored @@ -569,7 +569,7 @@ describe("tck/rfs/003", () => { WITH * CALL { WITH this - MATCH (this)<-[this_director_Director_unique:\`DIRECTED\`]-(:Director) + MATCH (this)<-[this_director_Director_unique:DIRECTED]-(:Director) WITH count(this_director_Director_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.director must be less than or equal to one', [0]) RETURN c AS this_director_Director_unique_ignored @@ -624,16 +624,16 @@ describe("tck/rfs/003", () => { const result = await translateQuery(neoSchema, mutation); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.id = $param0 WITH this CREATE (this_director0_create0_node:Director) SET this_director0_create0_node.id = $this_director0_create0_node_id - MERGE (this)<-[:\`DIRECTED\`]-(this_director0_create0_node) + MERGE (this)<-[:DIRECTED]-(this_director0_create0_node) WITH this, this_director0_create0_node CALL { WITH this_director0_create0_node - MATCH (this_director0_create0_node)-[this_director0_create0_node_address_Address_unique:\`HAS_ADDRESS\`]->(:Address) + MATCH (this_director0_create0_node)-[this_director0_create0_node_address_Address_unique:HAS_ADDRESS]->(:Address) WITH count(this_director0_create0_node_address_Address_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDDirector.address required exactly once', [0]) RETURN c AS this_director0_create0_node_address_Address_unique_ignored @@ -641,7 +641,7 @@ describe("tck/rfs/003", () => { WITH * CALL { WITH this - MATCH (this)<-[this_director_Director_unique:\`DIRECTED\`]-(:Director) + MATCH (this)<-[this_director_Director_unique:DIRECTED]-(:Director) WITH count(this_director_Director_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.director required exactly once', [0]) RETURN c AS this_director_Director_unique_ignored @@ -710,17 +710,17 @@ describe("tck/rfs/003", () => { const result = await translateQuery(neoSchema, mutation); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.id = $param0 WITH * CALL { WITH * - OPTIONAL MATCH (this)<-[this_delete_director0_relationship:\`DIRECTED\`]-(this_delete_director0:Director) + OPTIONAL MATCH (this)<-[this_delete_director0_relationship:DIRECTED]-(this_delete_director0:Director) WHERE this_delete_director0.id = $updateMovies_args_delete_director_where_this_delete_director0param0 WITH * CALL { WITH * - OPTIONAL MATCH (this_delete_director0)-[this_delete_director0_address0_relationship:\`HAS_ADDRESS\`]->(this_delete_director0_address0:Address) + OPTIONAL MATCH (this_delete_director0)-[this_delete_director0_address0_relationship:HAS_ADDRESS]->(this_delete_director0_address0:Address) WHERE this_delete_director0_address0.id = $updateMovies_args_delete_director_delete_address_where_this_delete_director0_address0param0 WITH this_delete_director0_address0_relationship, collect(DISTINCT this_delete_director0_address0) AS this_delete_director0_address0_to_delete CALL { @@ -740,14 +740,14 @@ describe("tck/rfs/003", () => { WITH * CALL { WITH this - MATCH (this)<-[this_director_Director_unique:\`DIRECTED\`]-(:Director) + MATCH (this)<-[this_director_Director_unique:DIRECTED]-(:Director) WITH count(this_director_Director_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.director required exactly once', [0]) RETURN c AS this_director_Director_unique_ignored } CALL { WITH this - MATCH (this)<-[this_coDirector_CoDirector_unique:\`CO_DIRECTED\`]-(:CoDirector) + MATCH (this)<-[this_coDirector_CoDirector_unique:CO_DIRECTED]-(:CoDirector) WITH count(this_coDirector_CoDirector_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.coDirector must be less than or equal to one', [0]) RETURN c AS this_coDirector_CoDirector_unique_ignored @@ -835,17 +835,17 @@ describe("tck/rfs/003", () => { const result = await translateQuery(neoSchema, mutation); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.id = $param0 WITH * CALL { WITH * - OPTIONAL MATCH (this)<-[this_delete_director0_relationship:\`DIRECTED\`]-(this_delete_director0:Director) + OPTIONAL MATCH (this)<-[this_delete_director0_relationship:DIRECTED]-(this_delete_director0:Director) WHERE this_delete_director0.id = $updateMovies_args_delete_director_where_this_delete_director0param0 WITH * CALL { WITH * - OPTIONAL MATCH (this_delete_director0)-[this_delete_director0_address0_relationship:\`HAS_ADDRESS\`]->(this_delete_director0_address0:Address) + OPTIONAL MATCH (this_delete_director0)-[this_delete_director0_address0_relationship:HAS_ADDRESS]->(this_delete_director0_address0:Address) WHERE this_delete_director0_address0.id = $updateMovies_args_delete_director_delete_address_where_this_delete_director0_address0param0 WITH this_delete_director0_address0_relationship, collect(DISTINCT this_delete_director0_address0) AS this_delete_director0_address0_to_delete CALL { @@ -865,14 +865,14 @@ describe("tck/rfs/003", () => { WITH * CALL { WITH this - MATCH (this)<-[this_director_Director_unique:\`DIRECTED\`]-(:Director) + MATCH (this)<-[this_director_Director_unique:DIRECTED]-(:Director) WITH count(this_director_Director_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.director must be less than or equal to one', [0]) RETURN c AS this_director_Director_unique_ignored } CALL { WITH this - MATCH (this)<-[this_coDirector_CoDirector_unique:\`CO_DIRECTED\`]-(:CoDirector) + MATCH (this)<-[this_coDirector_CoDirector_unique:CO_DIRECTED]-(:CoDirector) WITH count(this_coDirector_CoDirector_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.coDirector must be less than or equal to one', [0]) RETURN c AS this_coDirector_CoDirector_unique_ignored @@ -960,7 +960,7 @@ describe("tck/rfs/003", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_director_connect0_node - MERGE (this0)<-[:\`DIRECTED\`]-(this0_director_connect0_node) + MERGE (this0)<-[:DIRECTED]-(this0_director_connect0_node) } } WITH this0, this0_director_connect0_node @@ -969,7 +969,7 @@ describe("tck/rfs/003", () => { WITH this0 CALL { WITH this0 - MATCH (this0)<-[this0_director_Director_unique:\`DIRECTED\`]-(:Director) + MATCH (this0)<-[this0_director_Director_unique:DIRECTED]-(:Director) WITH count(this0_director_Director_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.director required exactly once', [0]) RETURN c AS this0_director_Director_unique_ignored @@ -1033,7 +1033,7 @@ describe("tck/rfs/003", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_director_connect0_node - MERGE (this0)<-[:\`DIRECTED\`]-(this0_director_connect0_node) + MERGE (this0)<-[:DIRECTED]-(this0_director_connect0_node) } } WITH this0, this0_director_connect0_node @@ -1042,7 +1042,7 @@ describe("tck/rfs/003", () => { WITH this0 CALL { WITH this0 - MATCH (this0)<-[this0_director_Director_unique:\`DIRECTED\`]-(:Director) + MATCH (this0)<-[this0_director_Director_unique:DIRECTED]-(:Director) WITH count(this0_director_Director_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.director must be less than or equal to one', [0]) RETURN c AS this0_director_Director_unique_ignored @@ -1124,7 +1124,7 @@ describe("tck/rfs/003", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_director_connect0_node - MERGE (this0)<-[:\`DIRECTED\`]-(this0_director_connect0_node) + MERGE (this0)<-[:DIRECTED]-(this0_director_connect0_node) } } WITH this0, this0_director_connect0_node @@ -1139,13 +1139,13 @@ describe("tck/rfs/003", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0_director_connect0_node UNWIND connectedNodes as this0_director_connect0_node_address0_node - MERGE (this0_director_connect0_node)-[:\`HAS_ADDRESS\`]->(this0_director_connect0_node_address0_node) + MERGE (this0_director_connect0_node)-[:HAS_ADDRESS]->(this0_director_connect0_node_address0_node) } } WITH this0, this0_director_connect0_node, this0_director_connect0_node_address0_node CALL { WITH this0_director_connect0_node - MATCH (this0_director_connect0_node)-[this0_director_connect0_node_address_Address_unique:\`HAS_ADDRESS\`]->(:Address) + MATCH (this0_director_connect0_node)-[this0_director_connect0_node_address_Address_unique:HAS_ADDRESS]->(:Address) WITH count(this0_director_connect0_node_address_Address_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDDirector.address required exactly once', [0]) RETURN c AS this0_director_connect0_node_address_Address_unique_ignored @@ -1158,7 +1158,7 @@ describe("tck/rfs/003", () => { WITH this0 CALL { WITH this0 - MATCH (this0)<-[this0_director_Director_unique:\`DIRECTED\`]-(:Director) + MATCH (this0)<-[this0_director_Director_unique:DIRECTED]-(:Director) WITH count(this0_director_Director_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.director required exactly once', [0]) RETURN c AS this0_director_Director_unique_ignored @@ -1211,12 +1211,12 @@ describe("tck/rfs/003", () => { const result = await translateQuery(neoSchema, mutation); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.id = $param0 WITH this CALL { WITH this - OPTIONAL MATCH (this)<-[this_disconnect_director0_rel:\`DIRECTED\`]-(this_disconnect_director0:Director) + OPTIONAL MATCH (this)<-[this_disconnect_director0_rel:DIRECTED]-(this_disconnect_director0:Director) WHERE this_disconnect_director0.id = $updateMovies_args_disconnect_director_where_Director_this_disconnect_director0param0 CALL { WITH this_disconnect_director0, this_disconnect_director0_rel, this @@ -1230,7 +1230,7 @@ describe("tck/rfs/003", () => { WITH * CALL { WITH this - MATCH (this)<-[this_director_Director_unique:\`DIRECTED\`]-(:Director) + MATCH (this)<-[this_director_Director_unique:DIRECTED]-(:Director) WITH count(this_director_Director_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.director required exactly once', [0]) RETURN c AS this_director_Director_unique_ignored @@ -1304,12 +1304,12 @@ describe("tck/rfs/003", () => { const result = await translateQuery(neoSchema, mutation); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.id = $param0 WITH this CALL { WITH this - OPTIONAL MATCH (this)<-[this_disconnect_director0_rel:\`DIRECTED\`]-(this_disconnect_director0:Director) + OPTIONAL MATCH (this)<-[this_disconnect_director0_rel:DIRECTED]-(this_disconnect_director0:Director) WHERE this_disconnect_director0.id = $updateMovies_args_disconnect_director_where_Director_this_disconnect_director0param0 CALL { WITH this_disconnect_director0, this_disconnect_director0_rel, this @@ -1331,7 +1331,7 @@ describe("tck/rfs/003", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_director0_node - MERGE (this)<-[:\`DIRECTED\`]-(this_connect_director0_node) + MERGE (this)<-[:DIRECTED]-(this_connect_director0_node) } } WITH this, this_connect_director0_node @@ -1340,14 +1340,14 @@ describe("tck/rfs/003", () => { WITH * CALL { WITH this - MATCH (this)<-[update_this0:\`DIRECTED\`]-(update_this1:\`Director\`) + MATCH (this)<-[update_this0:DIRECTED]-(update_this1:Director) WITH update_this1 { .id } AS update_this1 RETURN head(collect(update_this1)) AS update_var2 } WITH * CALL { WITH this - MATCH (this)<-[this_director_Director_unique:\`DIRECTED\`]-(:Director) + MATCH (this)<-[this_director_Director_unique:DIRECTED]-(:Director) WITH count(this_director_Director_unique) as c CALL apoc.util.validate(NOT (c = 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.director required exactly once', [0]) RETURN c AS this_director_Director_unique_ignored @@ -1420,12 +1420,12 @@ describe("tck/rfs/003", () => { const result = await translateQuery(neoSchema, mutation); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.id = $param0 WITH this CALL { WITH this - OPTIONAL MATCH (this)<-[this_disconnect_director0_rel:\`DIRECTED\`]-(this_disconnect_director0:Director) + OPTIONAL MATCH (this)<-[this_disconnect_director0_rel:DIRECTED]-(this_disconnect_director0:Director) WHERE this_disconnect_director0.id = $updateMovies_args_disconnect_director_where_Director_this_disconnect_director0param0 CALL { WITH this_disconnect_director0, this_disconnect_director0_rel, this @@ -1447,7 +1447,7 @@ describe("tck/rfs/003", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_director0_node - MERGE (this)<-[:\`DIRECTED\`]-(this_connect_director0_node) + MERGE (this)<-[:DIRECTED]-(this_connect_director0_node) } } WITH this, this_connect_director0_node @@ -1456,14 +1456,14 @@ describe("tck/rfs/003", () => { WITH * CALL { WITH this - MATCH (this)<-[update_this0:\`DIRECTED\`]-(update_this1:\`Director\`) + MATCH (this)<-[update_this0:DIRECTED]-(update_this1:Director) WITH update_this1 { .id } AS update_this1 RETURN head(collect(update_this1)) AS update_var2 } WITH * CALL { WITH this - MATCH (this)<-[this_director_Director_unique:\`DIRECTED\`]-(:Director) + MATCH (this)<-[this_director_Director_unique:DIRECTED]-(:Director) WITH count(this_director_Director_unique) as c CALL apoc.util.validate(NOT (c <= 1), '@neo4j/graphql/RELATIONSHIP-REQUIREDMovie.director must be less than or equal to one', [0]) RETURN c AS this_director_Director_unique_ignored diff --git a/packages/graphql/tests/tck/rfcs/rfc-022.test.ts b/packages/graphql/tests/tck/rfcs/rfc-022.test.ts index 181cb30e53..e7b9c0c5da 100644 --- a/packages/graphql/tests/tck/rfcs/rfc-022.test.ts +++ b/packages/graphql/tests/tck/rfcs/rfc-022.test.ts @@ -68,11 +68,11 @@ describe("tck/rfs/022 subquery projection", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.released = $param0 CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Person\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Person) WHERE this1.name = $param1 WITH this1 { .name } AS this1 RETURN collect(this1) AS var2 @@ -110,15 +110,15 @@ describe("tck/rfs/022 subquery projection", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.released = $param0 CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Person\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Person) WHERE this1.name = $param1 CALL { WITH this1 - MATCH (this1)-[this2:\`DIRECTED\`]->(this3:\`Movie\`) + MATCH (this1)-[this2:DIRECTED]->(this3:Movie) WITH this3 { .title, .released } AS this3 RETURN collect(this3) AS var4 } @@ -195,11 +195,11 @@ describe("tck/rfs/022 subquery projection", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.released = $param0 CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Person\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Person) WHERE (this1.name = $param1 AND (($isAuthenticated = true AND this1.name = $param3) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (this1.name = coalesce($jwt.test, $jwtDefault) AND $param6 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]))) WITH this1 { .name } AS this1 RETURN collect(this1) AS var2 diff --git a/packages/graphql/tests/tck/root-connection.test.ts b/packages/graphql/tests/tck/root-connection.test.ts index d39d5bb987..88627c4154 100644 --- a/packages/graphql/tests/tck/root-connection.test.ts +++ b/packages/graphql/tests/tck/root-connection.test.ts @@ -62,7 +62,7 @@ describe("Root Connection Query tests", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 WITH collect(this) AS edges WITH edges, size(edges) AS totalCount @@ -95,7 +95,7 @@ describe("Root Connection Query tests", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WITH collect(this) AS edges WITH edges, size(edges) AS totalCount UNWIND edges AS this @@ -131,7 +131,7 @@ describe("Root Connection Query tests", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title CONTAINS $param0 WITH collect(this) AS edges WITH edges, size(edges) AS totalCount @@ -176,7 +176,7 @@ describe("Root Connection Query tests", () => { `; const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WITH collect(this) AS edges WITH edges, size(edges) AS totalCount UNWIND edges AS this @@ -186,7 +186,7 @@ describe("Root Connection Query tests", () => { LIMIT $param0 CALL { WITH this - MATCH (this)<-[this0:\`ACTED_IN\`]-(this1:\`Actor\`) + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WITH { node: { name: this1.name } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount diff --git a/packages/graphql/tests/tck/simple.test.ts b/packages/graphql/tests/tck/simple.test.ts index 8a66c94566..a832134c4a 100644 --- a/packages/graphql/tests/tck/simple.test.ts +++ b/packages/graphql/tests/tck/simple.test.ts @@ -51,7 +51,7 @@ describe("Simple Cypher tests", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 RETURN this { .title } AS this" `); @@ -76,7 +76,7 @@ describe("Simple Cypher tests", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 RETURN this { .id, .title } AS this" `); @@ -103,7 +103,7 @@ describe("Simple Cypher tests", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 RETURN this { .id, .title } AS this" `); diff --git a/packages/graphql/tests/tck/sort.test.ts b/packages/graphql/tests/tck/sort.test.ts index 30019bf3e8..aa1386794b 100644 --- a/packages/graphql/tests/tck/sort.test.ts +++ b/packages/graphql/tests/tck/sort.test.ts @@ -75,7 +75,7 @@ describe("Cypher sort tests", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WITH * ORDER BY this.id DESC RETURN this { .id, .title } AS this" @@ -97,7 +97,7 @@ describe("Cypher sort tests", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WITH * ORDER BY this.id DESC RETURN this { aliased: this.id, .title, .id } AS this" @@ -118,7 +118,7 @@ describe("Cypher sort tests", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WITH * ORDER BY this.id DESC RETURN this { .title, .id } AS this" @@ -140,7 +140,7 @@ describe("Cypher sort tests", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this CALL { @@ -173,7 +173,7 @@ describe("Cypher sort tests", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WITH * ORDER BY this.id DESC, this.title ASC RETURN this { .id, .title } AS this" @@ -200,7 +200,7 @@ describe("Cypher sort tests", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 WITH * ORDER BY this.id DESC, this.title ASC @@ -238,10 +238,10 @@ describe("Cypher sort tests", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[this0:\`HAS_GENRE\`]->(this1:\`Genre\`) + MATCH (this)-[this0:HAS_GENRE]->(this1:Genre) WITH this1 { .name } AS this1 ORDER BY this1.name DESC RETURN collect(this1) AS var2 @@ -266,10 +266,10 @@ describe("Cypher sort tests", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[this0:\`HAS_GENRE\`]->(this1:\`Genre\`) + MATCH (this)-[this0:HAS_GENRE]->(this1:Genre) WITH this1 { .name } AS this1 ORDER BY this1.name ASC RETURN collect(this1) AS var2 @@ -295,10 +295,10 @@ describe("Cypher sort tests", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this - MATCH (this)-[this0:\`HAS_GENRE\`]->(this1:\`Genre\`) + MATCH (this)-[this0:HAS_GENRE]->(this1:Genre) CALL { WITH this1 CALL { diff --git a/packages/graphql/tests/tck/subscriptions/create-auth.test.ts b/packages/graphql/tests/tck/subscriptions/create-auth.test.ts index e07e2b2b47..c49c6dac91 100644 --- a/packages/graphql/tests/tck/subscriptions/create-auth.test.ts +++ b/packages/graphql/tests/tck/subscriptions/create-auth.test.ts @@ -91,7 +91,7 @@ describe("Subscriptions metadata on create", () => { RETURN this1, meta AS this1_meta } WITH this0, this1, this0_meta + this1_meta AS meta - RETURN [ this0 { .id }, this1 { .id } ] AS data, meta" + RETURN [this0 { .id }, this1 { .id }] AS data, meta" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` diff --git a/packages/graphql/tests/tck/subscriptions/create.test.ts b/packages/graphql/tests/tck/subscriptions/create.test.ts index 78dad67d74..2572794027 100644 --- a/packages/graphql/tests/tck/subscriptions/create.test.ts +++ b/packages/graphql/tests/tck/subscriptions/create.test.ts @@ -110,7 +110,7 @@ describe("Subscriptions metadata on create", () => { CREATE (this0_actors0_node:Actor) SET this0_actors0_node.name = $this0_actors0_node_name WITH meta + { event: \\"create\\", id: id(this0_actors0_node), properties: { old: null, new: this0_actors0_node { .* } }, timestamp: timestamp(), typename: \\"Actor\\" } AS meta, this0, this0_actors0_node - MERGE (this0)<-[this0_actors0_relationship:\`ACTED_IN\`]-(this0_actors0_node) + MERGE (this0)<-[this0_actors0_relationship:ACTED_IN]-(this0_actors0_node) SET this0_actors0_relationship.screenTime = $this0_actors0_relationship_screenTime WITH meta + { event: \\"create_relationship\\", timestamp: timestamp(), id_from: id(this0_actors0_node), id_to: id(this0), id: id(this0_actors0_relationship), relationshipName: \\"ACTED_IN\\", fromTypename: \\"Actor\\", toTypename: \\"Movie\\", properties: { from: this0_actors0_node { .* }, to: this0 { .* }, relationship: this0_actors0_relationship { .* } } } AS meta, this0, this0_actors0_node WITH meta + { event: \\"create\\", id: id(this0), properties: { old: null, new: this0 { .* } }, timestamp: timestamp(), typename: \\"Movie\\" } AS meta, this0 @@ -119,13 +119,13 @@ describe("Subscriptions metadata on create", () => { WITH this0, this0_meta AS meta CALL { WITH this0 - MATCH (this0)<-[create_this0:\`ACTED_IN\`]-(create_this1:\`Actor\`) + MATCH (this0)<-[create_this0:ACTED_IN]-(create_this1:Actor) WITH { screenTime: create_this0.screenTime, node: { name: create_this1.name } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount RETURN { edges: edges, totalCount: totalCount } AS create_var2 } - RETURN [ this0 { .title, actorsConnection: create_var2 } ] AS data, meta" + RETURN [this0 { .title, actorsConnection: create_var2 }] AS data, meta" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ @@ -190,7 +190,7 @@ describe("Subscriptions metadata on create", () => { CREATE (this0_actors0_node:Actor) SET this0_actors0_node.name = $this0_actors0_node_name WITH meta + { event: \\"create\\", id: id(this0_actors0_node), properties: { old: null, new: this0_actors0_node { .* } }, timestamp: timestamp(), typename: \\"Actor\\" } AS meta, this0, this0_actors0_node - MERGE (this0)<-[this0_actors0_relationship:\`ACTED_IN\`]-(this0_actors0_node) + MERGE (this0)<-[this0_actors0_relationship:ACTED_IN]-(this0_actors0_node) WITH meta + { event: \\"create_relationship\\", timestamp: timestamp(), id_from: id(this0_actors0_node), id_to: id(this0), id: id(this0_actors0_relationship), relationshipName: \\"ACTED_IN\\", fromTypename: \\"Actor\\", toTypename: \\"Movie\\", properties: { from: this0_actors0_node { .* }, to: this0 { .* }, relationship: this0_actors0_relationship { .* } } } AS meta, this0, this0_actors0_node WITH meta + { event: \\"create\\", id: id(this0), properties: { old: null, new: this0 { .* } }, timestamp: timestamp(), typename: \\"Movie\\" } AS meta, this0 RETURN this0, meta AS this0_meta @@ -198,13 +198,13 @@ describe("Subscriptions metadata on create", () => { WITH this0, this0_meta AS meta CALL { WITH this0 - MATCH (this0)<-[create_this0:\`ACTED_IN\`]-(create_this1:\`Actor\`) + MATCH (this0)<-[create_this0:ACTED_IN]-(create_this1:Actor) WITH { node: { name: create_this1.name } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount RETURN { edges: edges, totalCount: totalCount } AS create_var2 } - RETURN [ this0 { .title, actorsConnection: create_var2 } ] AS data, meta" + RETURN [this0 { .title, actorsConnection: create_var2 }] AS data, meta" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ @@ -289,11 +289,11 @@ describe("Subscriptions metadata on create", () => { CREATE (this0_actors0_node_movies0_node:Movie) SET this0_actors0_node_movies0_node.title = $this0_actors0_node_movies0_node_title WITH meta + { event: \\"create\\", id: id(this0_actors0_node_movies0_node), properties: { old: null, new: this0_actors0_node_movies0_node { .* } }, timestamp: timestamp(), typename: \\"Movie\\" } AS meta, this0, this0_actors0_node, this0_actors0_node_movies0_node - MERGE (this0_actors0_node)-[this0_actors0_node_movies0_relationship:\`ACTED_IN\`]->(this0_actors0_node_movies0_node) + MERGE (this0_actors0_node)-[this0_actors0_node_movies0_relationship:ACTED_IN]->(this0_actors0_node_movies0_node) SET this0_actors0_node_movies0_relationship.screenTime = $this0_actors0_node_movies0_relationship_screenTime WITH meta + { event: \\"create_relationship\\", timestamp: timestamp(), id_from: id(this0_actors0_node), id_to: id(this0_actors0_node_movies0_node), id: id(this0_actors0_node_movies0_relationship), relationshipName: \\"ACTED_IN\\", fromTypename: \\"Actor\\", toTypename: \\"Movie\\", properties: { from: this0_actors0_node { .* }, to: this0_actors0_node_movies0_node { .* }, relationship: this0_actors0_node_movies0_relationship { .* } } } AS meta, this0, this0_actors0_node, this0_actors0_node_movies0_node WITH meta + { event: \\"create\\", id: id(this0_actors0_node), properties: { old: null, new: this0_actors0_node { .* } }, timestamp: timestamp(), typename: \\"Actor\\" } AS meta, this0, this0_actors0_node - MERGE (this0)<-[this0_actors0_relationship:\`ACTED_IN\`]-(this0_actors0_node) + MERGE (this0)<-[this0_actors0_relationship:ACTED_IN]-(this0_actors0_node) SET this0_actors0_relationship.screenTime = $this0_actors0_relationship_screenTime WITH meta + { event: \\"create_relationship\\", timestamp: timestamp(), id_from: id(this0_actors0_node), id_to: id(this0), id: id(this0_actors0_relationship), relationshipName: \\"ACTED_IN\\", fromTypename: \\"Actor\\", toTypename: \\"Movie\\", properties: { from: this0_actors0_node { .* }, to: this0 { .* }, relationship: this0_actors0_relationship { .* } } } AS meta, this0, this0_actors0_node WITH meta + { event: \\"create\\", id: id(this0), properties: { old: null, new: this0 { .* } }, timestamp: timestamp(), typename: \\"Movie\\" } AS meta, this0 @@ -302,13 +302,13 @@ describe("Subscriptions metadata on create", () => { WITH this0, this0_meta AS meta CALL { WITH this0 - MATCH (this0)<-[create_this0:\`ACTED_IN\`]-(create_this1:\`Actor\`) + MATCH (this0)<-[create_this0:ACTED_IN]-(create_this1:Actor) WITH { screenTime: create_this0.screenTime, node: { name: create_this1.name } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount RETURN { edges: edges, totalCount: totalCount } AS create_var2 } - RETURN [ this0 { .title, actorsConnection: create_var2 } ] AS data, meta" + RETURN [this0 { .title, actorsConnection: create_var2 }] AS data, meta" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ @@ -402,13 +402,13 @@ describe("Subscriptions metadata on create", () => { CREATE (this0_directors_Actor0_node:Actor) SET this0_directors_Actor0_node.name = $this0_directors_Actor0_node_name WITH meta + { event: \\"create\\", id: id(this0_directors_Actor0_node), properties: { old: null, new: this0_directors_Actor0_node { .* } }, timestamp: timestamp(), typename: \\"Actor\\" } AS meta, this0, this0_directors_Actor0_node - MERGE (this0)<-[this0_directors_Actor0_relationship:\`DIRECTED\`]-(this0_directors_Actor0_node) + MERGE (this0)<-[this0_directors_Actor0_relationship:DIRECTED]-(this0_directors_Actor0_node) SET this0_directors_Actor0_relationship.year = $this0_directors_Actor0_relationship_year WITH meta + { event: \\"create_relationship\\", timestamp: timestamp(), id_from: id(this0_directors_Actor0_node), id_to: id(this0), id: id(this0_directors_Actor0_relationship), relationshipName: \\"DIRECTED\\", fromTypename: \\"Actor\\", toTypename: \\"Movie\\", properties: { from: this0_directors_Actor0_node { .* }, to: this0 { .* }, relationship: this0_directors_Actor0_relationship { .* } } } AS meta, this0, this0_directors_Actor0_node CREATE (this0_directors_Person0_node:Person) SET this0_directors_Person0_node.name = $this0_directors_Person0_node_name WITH meta + { event: \\"create\\", id: id(this0_directors_Person0_node), properties: { old: null, new: this0_directors_Person0_node { .* } }, timestamp: timestamp(), typename: \\"Person\\" } AS meta, this0, this0_directors_Person0_node - MERGE (this0)<-[this0_directors_Person0_relationship:\`DIRECTED\`]-(this0_directors_Person0_node) + MERGE (this0)<-[this0_directors_Person0_relationship:DIRECTED]-(this0_directors_Person0_node) SET this0_directors_Person0_relationship.year = $this0_directors_Person0_relationship_year WITH meta + { event: \\"create_relationship\\", timestamp: timestamp(), id_from: id(this0_directors_Person0_node), id_to: id(this0), id: id(this0_directors_Person0_relationship), relationshipName: \\"DIRECTED\\", fromTypename: \\"Person\\", toTypename: \\"Movie\\", properties: { from: this0_directors_Person0_node { .* }, to: this0 { .* }, relationship: this0_directors_Person0_relationship { .* } } } AS meta, this0, this0_directors_Person0_node WITH meta + { event: \\"create\\", id: id(this0), properties: { old: null, new: this0 { .* } }, timestamp: timestamp(), typename: \\"Movie\\" } AS meta, this0 @@ -419,19 +419,19 @@ describe("Subscriptions metadata on create", () => { WITH this0 CALL { WITH * - MATCH (this0)<-[create_this0:\`DIRECTED\`]-(create_this1:\`Actor\`) + MATCH (this0)<-[create_this0:DIRECTED]-(create_this1:Actor) WITH create_this1 { __resolveType: \\"Actor\\", __id: id(this0), .name } AS create_this1 RETURN create_this1 AS create_var2 UNION WITH * - MATCH (this0)<-[create_this3:\`DIRECTED\`]-(create_this4:\`Person\`) + MATCH (this0)<-[create_this3:DIRECTED]-(create_this4:Person) WITH create_this4 { __resolveType: \\"Person\\", __id: id(this0), .name } AS create_this4 RETURN create_this4 AS create_var2 } WITH create_var2 RETURN collect(create_var2) AS create_var2 } - RETURN [ this0 { .title, directors: create_var2 } ] AS data, meta" + RETURN [this0 { .title, directors: create_var2 }] AS data, meta" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ @@ -544,17 +544,17 @@ describe("Subscriptions metadata on create", () => { CREATE (this0_directors_Actor0_node_movies0_node:Movie) SET this0_directors_Actor0_node_movies0_node.title = $this0_directors_Actor0_node_movies0_node_title WITH meta + { event: \\"create\\", id: id(this0_directors_Actor0_node_movies0_node), properties: { old: null, new: this0_directors_Actor0_node_movies0_node { .* } }, timestamp: timestamp(), typename: \\"Movie\\" } AS meta, this0, this0_directors_Actor0_node, this0_directors_Actor0_node_movies0_node - MERGE (this0_directors_Actor0_node)-[this0_directors_Actor0_node_movies0_relationship:\`ACTED_IN\`]->(this0_directors_Actor0_node_movies0_node) + MERGE (this0_directors_Actor0_node)-[this0_directors_Actor0_node_movies0_relationship:ACTED_IN]->(this0_directors_Actor0_node_movies0_node) SET this0_directors_Actor0_node_movies0_relationship.screenTime = $this0_directors_Actor0_node_movies0_relationship_screenTime WITH meta + { event: \\"create_relationship\\", timestamp: timestamp(), id_from: id(this0_directors_Actor0_node), id_to: id(this0_directors_Actor0_node_movies0_node), id: id(this0_directors_Actor0_node_movies0_relationship), relationshipName: \\"ACTED_IN\\", fromTypename: \\"Actor\\", toTypename: \\"Movie\\", properties: { from: this0_directors_Actor0_node { .* }, to: this0_directors_Actor0_node_movies0_node { .* }, relationship: this0_directors_Actor0_node_movies0_relationship { .* } } } AS meta, this0, this0_directors_Actor0_node, this0_directors_Actor0_node_movies0_node WITH meta + { event: \\"create\\", id: id(this0_directors_Actor0_node), properties: { old: null, new: this0_directors_Actor0_node { .* } }, timestamp: timestamp(), typename: \\"Actor\\" } AS meta, this0, this0_directors_Actor0_node - MERGE (this0)<-[this0_directors_Actor0_relationship:\`DIRECTED\`]-(this0_directors_Actor0_node) + MERGE (this0)<-[this0_directors_Actor0_relationship:DIRECTED]-(this0_directors_Actor0_node) SET this0_directors_Actor0_relationship.year = $this0_directors_Actor0_relationship_year WITH meta + { event: \\"create_relationship\\", timestamp: timestamp(), id_from: id(this0_directors_Actor0_node), id_to: id(this0), id: id(this0_directors_Actor0_relationship), relationshipName: \\"DIRECTED\\", fromTypename: \\"Actor\\", toTypename: \\"Movie\\", properties: { from: this0_directors_Actor0_node { .* }, to: this0 { .* }, relationship: this0_directors_Actor0_relationship { .* } } } AS meta, this0, this0_directors_Actor0_node CREATE (this0_directors_Person0_node:Person) SET this0_directors_Person0_node.name = $this0_directors_Person0_node_name WITH meta + { event: \\"create\\", id: id(this0_directors_Person0_node), properties: { old: null, new: this0_directors_Person0_node { .* } }, timestamp: timestamp(), typename: \\"Person\\" } AS meta, this0, this0_directors_Person0_node - MERGE (this0)<-[this0_directors_Person0_relationship:\`DIRECTED\`]-(this0_directors_Person0_node) + MERGE (this0)<-[this0_directors_Person0_relationship:DIRECTED]-(this0_directors_Person0_node) SET this0_directors_Person0_relationship.year = $this0_directors_Person0_relationship_year WITH meta + { event: \\"create_relationship\\", timestamp: timestamp(), id_from: id(this0_directors_Person0_node), id_to: id(this0), id: id(this0_directors_Person0_relationship), relationshipName: \\"DIRECTED\\", fromTypename: \\"Person\\", toTypename: \\"Movie\\", properties: { from: this0_directors_Person0_node { .* }, to: this0 { .* }, relationship: this0_directors_Person0_relationship { .* } } } AS meta, this0, this0_directors_Person0_node WITH meta + { event: \\"create\\", id: id(this0), properties: { old: null, new: this0 { .* } }, timestamp: timestamp(), typename: \\"Movie\\" } AS meta, this0 @@ -565,10 +565,10 @@ describe("Subscriptions metadata on create", () => { WITH this0 CALL { WITH * - MATCH (this0)<-[create_this0:\`DIRECTED\`]-(create_this1:\`Actor\`) + MATCH (this0)<-[create_this0:DIRECTED]-(create_this1:Actor) CALL { WITH create_this1 - MATCH (create_this1)-[create_this2:\`ACTED_IN\`]->(create_this3:\`Movie\`) + MATCH (create_this1)-[create_this2:ACTED_IN]->(create_this3:Movie) WITH create_this3 { .title } AS create_this3 RETURN collect(create_this3) AS create_var4 } @@ -576,14 +576,14 @@ describe("Subscriptions metadata on create", () => { RETURN create_this1 AS create_var5 UNION WITH * - MATCH (this0)<-[create_this6:\`DIRECTED\`]-(create_this7:\`Person\`) + MATCH (this0)<-[create_this6:DIRECTED]-(create_this7:Person) WITH create_this7 { __resolveType: \\"Person\\", __id: id(this0), .name } AS create_this7 RETURN create_this7 AS create_var5 } WITH create_var5 RETURN collect(create_var5) AS create_var5 } - RETURN [ this0 { .title, directors: create_var5 } ] AS data, meta" + RETURN [this0 { .title, directors: create_var5 }] AS data, meta" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ @@ -630,7 +630,7 @@ describe("Subscriptions metadata on create", () => { RETURN this0, meta AS this0_meta } WITH this0, this0_meta AS meta - RETURN [ this0 { .id } ] AS data, meta" + RETURN [this0 { .id }] AS data, meta" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -670,7 +670,7 @@ describe("Subscriptions metadata on create", () => { RETURN this1, meta AS this1_meta } WITH this0, this1, this0_meta + this1_meta AS meta - RETURN [ this0 { .id }, this1 { .id } ] AS data, meta" + RETURN [this0 { .id }, this1 { .id }] AS data, meta" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -706,7 +706,7 @@ describe("Subscriptions metadata on create", () => { CREATE (this0_actors0_node:Actor) SET this0_actors0_node.name = $this0_actors0_node_name WITH meta + { event: \\"create\\", id: id(this0_actors0_node), properties: { old: null, new: this0_actors0_node { .* } }, timestamp: timestamp(), typename: \\"Actor\\" } AS meta, this0, this0_actors0_node - MERGE (this0)<-[this0_actors0_relationship:\`ACTED_IN\`]-(this0_actors0_node) + MERGE (this0)<-[this0_actors0_relationship:ACTED_IN]-(this0_actors0_node) WITH meta + { event: \\"create_relationship\\", timestamp: timestamp(), id_from: id(this0_actors0_node), id_to: id(this0), id: id(this0_actors0_relationship), relationshipName: \\"ACTED_IN\\", fromTypename: \\"Actor\\", toTypename: \\"Movie\\", properties: { from: this0_actors0_node { .* }, to: this0 { .* }, relationship: this0_actors0_relationship { .* } } } AS meta, this0, this0_actors0_node WITH meta + { event: \\"create\\", id: id(this0), properties: { old: null, new: this0 { .* } }, timestamp: timestamp(), typename: \\"Movie\\" } AS meta, this0 RETURN this0, meta AS this0_meta @@ -714,11 +714,11 @@ describe("Subscriptions metadata on create", () => { WITH this0, this0_meta AS meta CALL { WITH this0 - MATCH (this0)<-[create_this0:\`ACTED_IN\`]-(create_this1:\`Actor\`) + MATCH (this0)<-[create_this0:ACTED_IN]-(create_this1:Actor) WITH create_this1 { .name } AS create_this1 RETURN collect(create_this1) AS create_var2 } - RETURN [ this0 { .id, actors: create_var2 } ] AS data, meta" + RETURN [this0 { .id, actors: create_var2 }] AS data, meta" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -763,10 +763,10 @@ describe("Subscriptions metadata on create", () => { CREATE (this0_actors0_node_movies0_node:Movie) SET this0_actors0_node_movies0_node.id = $this0_actors0_node_movies0_node_id WITH meta + { event: \\"create\\", id: id(this0_actors0_node_movies0_node), properties: { old: null, new: this0_actors0_node_movies0_node { .* } }, timestamp: timestamp(), typename: \\"Movie\\" } AS meta, this0, this0_actors0_node, this0_actors0_node_movies0_node - MERGE (this0_actors0_node)-[this0_actors0_node_movies0_relationship:\`ACTED_IN\`]->(this0_actors0_node_movies0_node) + MERGE (this0_actors0_node)-[this0_actors0_node_movies0_relationship:ACTED_IN]->(this0_actors0_node_movies0_node) WITH meta + { event: \\"create_relationship\\", timestamp: timestamp(), id_from: id(this0_actors0_node), id_to: id(this0_actors0_node_movies0_node), id: id(this0_actors0_node_movies0_relationship), relationshipName: \\"ACTED_IN\\", fromTypename: \\"Actor\\", toTypename: \\"Movie\\", properties: { from: this0_actors0_node { .* }, to: this0_actors0_node_movies0_node { .* }, relationship: this0_actors0_node_movies0_relationship { .* } } } AS meta, this0, this0_actors0_node, this0_actors0_node_movies0_node WITH meta + { event: \\"create\\", id: id(this0_actors0_node), properties: { old: null, new: this0_actors0_node { .* } }, timestamp: timestamp(), typename: \\"Actor\\" } AS meta, this0, this0_actors0_node - MERGE (this0)<-[this0_actors0_relationship:\`ACTED_IN\`]-(this0_actors0_node) + MERGE (this0)<-[this0_actors0_relationship:ACTED_IN]-(this0_actors0_node) WITH meta + { event: \\"create_relationship\\", timestamp: timestamp(), id_from: id(this0_actors0_node), id_to: id(this0), id: id(this0_actors0_relationship), relationshipName: \\"ACTED_IN\\", fromTypename: \\"Actor\\", toTypename: \\"Movie\\", properties: { from: this0_actors0_node { .* }, to: this0 { .* }, relationship: this0_actors0_relationship { .* } } } AS meta, this0, this0_actors0_node WITH meta + { event: \\"create\\", id: id(this0), properties: { old: null, new: this0 { .* } }, timestamp: timestamp(), typename: \\"Movie\\" } AS meta, this0 RETURN this0, meta AS this0_meta @@ -774,11 +774,11 @@ describe("Subscriptions metadata on create", () => { WITH this0, this0_meta AS meta CALL { WITH this0 - MATCH (this0)<-[create_this0:\`ACTED_IN\`]-(create_this1:\`Actor\`) + MATCH (this0)<-[create_this0:ACTED_IN]-(create_this1:Actor) WITH create_this1 { .name } AS create_this1 RETURN collect(create_this1) AS create_var2 } - RETURN [ this0 { .id, actors: create_var2 } ] AS data, meta" + RETURN [this0 { .id, actors: create_var2 }] AS data, meta" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -843,13 +843,13 @@ describe("Subscriptions metadata on create", () => { CREATE (this0_actors0_node_movies0_node_actors0_node:Actor) SET this0_actors0_node_movies0_node_actors0_node.name = $this0_actors0_node_movies0_node_actors0_node_name WITH meta + { event: \\"create\\", id: id(this0_actors0_node_movies0_node_actors0_node), properties: { old: null, new: this0_actors0_node_movies0_node_actors0_node { .* } }, timestamp: timestamp(), typename: \\"Actor\\" } AS meta, this0, this0_actors0_node, this0_actors0_node_movies0_node, this0_actors0_node_movies0_node_actors0_node - MERGE (this0_actors0_node_movies0_node)<-[this0_actors0_node_movies0_node_actors0_relationship:\`ACTED_IN\`]-(this0_actors0_node_movies0_node_actors0_node) + MERGE (this0_actors0_node_movies0_node)<-[this0_actors0_node_movies0_node_actors0_relationship:ACTED_IN]-(this0_actors0_node_movies0_node_actors0_node) WITH meta + { event: \\"create_relationship\\", timestamp: timestamp(), id_from: id(this0_actors0_node_movies0_node_actors0_node), id_to: id(this0_actors0_node_movies0_node), id: id(this0_actors0_node_movies0_node_actors0_relationship), relationshipName: \\"ACTED_IN\\", fromTypename: \\"Actor\\", toTypename: \\"Movie\\", properties: { from: this0_actors0_node_movies0_node_actors0_node { .* }, to: this0_actors0_node_movies0_node { .* }, relationship: this0_actors0_node_movies0_node_actors0_relationship { .* } } } AS meta, this0, this0_actors0_node, this0_actors0_node_movies0_node, this0_actors0_node_movies0_node_actors0_node WITH meta + { event: \\"create\\", id: id(this0_actors0_node_movies0_node), properties: { old: null, new: this0_actors0_node_movies0_node { .* } }, timestamp: timestamp(), typename: \\"Movie\\" } AS meta, this0, this0_actors0_node, this0_actors0_node_movies0_node - MERGE (this0_actors0_node)-[this0_actors0_node_movies0_relationship:\`ACTED_IN\`]->(this0_actors0_node_movies0_node) + MERGE (this0_actors0_node)-[this0_actors0_node_movies0_relationship:ACTED_IN]->(this0_actors0_node_movies0_node) WITH meta + { event: \\"create_relationship\\", timestamp: timestamp(), id_from: id(this0_actors0_node), id_to: id(this0_actors0_node_movies0_node), id: id(this0_actors0_node_movies0_relationship), relationshipName: \\"ACTED_IN\\", fromTypename: \\"Actor\\", toTypename: \\"Movie\\", properties: { from: this0_actors0_node { .* }, to: this0_actors0_node_movies0_node { .* }, relationship: this0_actors0_node_movies0_relationship { .* } } } AS meta, this0, this0_actors0_node, this0_actors0_node_movies0_node WITH meta + { event: \\"create\\", id: id(this0_actors0_node), properties: { old: null, new: this0_actors0_node { .* } }, timestamp: timestamp(), typename: \\"Actor\\" } AS meta, this0, this0_actors0_node - MERGE (this0)<-[this0_actors0_relationship:\`ACTED_IN\`]-(this0_actors0_node) + MERGE (this0)<-[this0_actors0_relationship:ACTED_IN]-(this0_actors0_node) WITH meta + { event: \\"create_relationship\\", timestamp: timestamp(), id_from: id(this0_actors0_node), id_to: id(this0), id: id(this0_actors0_relationship), relationshipName: \\"ACTED_IN\\", fromTypename: \\"Actor\\", toTypename: \\"Movie\\", properties: { from: this0_actors0_node { .* }, to: this0 { .* }, relationship: this0_actors0_relationship { .* } } } AS meta, this0, this0_actors0_node WITH meta + { event: \\"create\\", id: id(this0), properties: { old: null, new: this0 { .* } }, timestamp: timestamp(), typename: \\"Movie\\" } AS meta, this0 RETURN this0, meta AS this0_meta @@ -857,13 +857,13 @@ describe("Subscriptions metadata on create", () => { WITH this0, this0_meta AS meta CALL { WITH this0 - MATCH (this0)<-[create_this0:\`ACTED_IN\`]-(create_this1:\`Actor\`) + MATCH (this0)<-[create_this0:ACTED_IN]-(create_this1:Actor) CALL { WITH create_this1 - MATCH (create_this1)-[create_this2:\`ACTED_IN\`]->(create_this3:\`Movie\`) + MATCH (create_this1)-[create_this2:ACTED_IN]->(create_this3:Movie) CALL { WITH create_this3 - MATCH (create_this3)<-[create_this4:\`ACTED_IN\`]-(create_this5:\`Actor\`) + MATCH (create_this3)<-[create_this4:ACTED_IN]-(create_this5:Actor) WITH create_this5 { .name } AS create_this5 RETURN collect(create_this5) AS create_var6 } @@ -873,7 +873,7 @@ describe("Subscriptions metadata on create", () => { WITH create_this1 { .name, movies: create_var7 } AS create_this1 RETURN collect(create_this1) AS create_var8 } - RETURN [ this0 { .id, actors: create_var8 } ] AS data, meta" + RETURN [this0 { .id, actors: create_var8 }] AS data, meta" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -921,10 +921,10 @@ describe("Subscriptions metadata on create", () => { CREATE (this0_actors0_node_movies0_node:Movie) SET this0_actors0_node_movies0_node.id = $this0_actors0_node_movies0_node_id WITH meta + { event: \\"create\\", id: id(this0_actors0_node_movies0_node), properties: { old: null, new: this0_actors0_node_movies0_node { .* } }, timestamp: timestamp(), typename: \\"Movie\\" } AS meta, this0, this0_actors0_node, this0_actors0_node_movies0_node - MERGE (this0_actors0_node)-[this0_actors0_node_movies0_relationship:\`ACTED_IN\`]->(this0_actors0_node_movies0_node) + MERGE (this0_actors0_node)-[this0_actors0_node_movies0_relationship:ACTED_IN]->(this0_actors0_node_movies0_node) WITH meta + { event: \\"create_relationship\\", timestamp: timestamp(), id_from: id(this0_actors0_node), id_to: id(this0_actors0_node_movies0_node), id: id(this0_actors0_node_movies0_relationship), relationshipName: \\"ACTED_IN\\", fromTypename: \\"Actor\\", toTypename: \\"Movie\\", properties: { from: this0_actors0_node { .* }, to: this0_actors0_node_movies0_node { .* }, relationship: this0_actors0_node_movies0_relationship { .* } } } AS meta, this0, this0_actors0_node, this0_actors0_node_movies0_node WITH meta + { event: \\"create\\", id: id(this0_actors0_node), properties: { old: null, new: this0_actors0_node { .* } }, timestamp: timestamp(), typename: \\"Actor\\" } AS meta, this0, this0_actors0_node - MERGE (this0)<-[this0_actors0_relationship:\`ACTED_IN\`]-(this0_actors0_node) + MERGE (this0)<-[this0_actors0_relationship:ACTED_IN]-(this0_actors0_node) WITH meta + { event: \\"create_relationship\\", timestamp: timestamp(), id_from: id(this0_actors0_node), id_to: id(this0), id: id(this0_actors0_relationship), relationshipName: \\"ACTED_IN\\", fromTypename: \\"Actor\\", toTypename: \\"Movie\\", properties: { from: this0_actors0_node { .* }, to: this0 { .* }, relationship: this0_actors0_relationship { .* } } } AS meta, this0, this0_actors0_node WITH meta + { event: \\"create\\", id: id(this0), properties: { old: null, new: this0 { .* } }, timestamp: timestamp(), typename: \\"Movie\\" } AS meta, this0 RETURN this0, meta AS this0_meta @@ -938,16 +938,16 @@ describe("Subscriptions metadata on create", () => { CREATE (this1_actors0_node_movies0_node:Movie) SET this1_actors0_node_movies0_node.id = $this1_actors0_node_movies0_node_id WITH meta + { event: \\"create\\", id: id(this1_actors0_node_movies0_node), properties: { old: null, new: this1_actors0_node_movies0_node { .* } }, timestamp: timestamp(), typename: \\"Movie\\" } AS meta, this1, this1_actors0_node, this1_actors0_node_movies0_node - MERGE (this1_actors0_node)-[this1_actors0_node_movies0_relationship:\`ACTED_IN\`]->(this1_actors0_node_movies0_node) + MERGE (this1_actors0_node)-[this1_actors0_node_movies0_relationship:ACTED_IN]->(this1_actors0_node_movies0_node) WITH meta + { event: \\"create_relationship\\", timestamp: timestamp(), id_from: id(this1_actors0_node), id_to: id(this1_actors0_node_movies0_node), id: id(this1_actors0_node_movies0_relationship), relationshipName: \\"ACTED_IN\\", fromTypename: \\"Actor\\", toTypename: \\"Movie\\", properties: { from: this1_actors0_node { .* }, to: this1_actors0_node_movies0_node { .* }, relationship: this1_actors0_node_movies0_relationship { .* } } } AS meta, this1, this1_actors0_node, this1_actors0_node_movies0_node WITH meta + { event: \\"create\\", id: id(this1_actors0_node), properties: { old: null, new: this1_actors0_node { .* } }, timestamp: timestamp(), typename: \\"Actor\\" } AS meta, this1, this1_actors0_node - MERGE (this1)<-[this1_actors0_relationship:\`ACTED_IN\`]-(this1_actors0_node) + MERGE (this1)<-[this1_actors0_relationship:ACTED_IN]-(this1_actors0_node) WITH meta + { event: \\"create_relationship\\", timestamp: timestamp(), id_from: id(this1_actors0_node), id_to: id(this1), id: id(this1_actors0_relationship), relationshipName: \\"ACTED_IN\\", fromTypename: \\"Actor\\", toTypename: \\"Movie\\", properties: { from: this1_actors0_node { .* }, to: this1 { .* }, relationship: this1_actors0_relationship { .* } } } AS meta, this1, this1_actors0_node WITH meta + { event: \\"create\\", id: id(this1), properties: { old: null, new: this1 { .* } }, timestamp: timestamp(), typename: \\"Movie\\" } AS meta, this1 RETURN this1, meta AS this1_meta } WITH this0, this1, this0_meta + this1_meta AS meta - RETURN [ this0 { .id }, this1 { .id } ] AS data, meta" + RETURN [this0 { .id }, this1 { .id }] AS data, meta" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` diff --git a/packages/graphql/tests/tck/subscriptions/delete.test.ts b/packages/graphql/tests/tck/subscriptions/delete.test.ts index f729fb3547..2ed9a86e00 100644 --- a/packages/graphql/tests/tck/subscriptions/delete.test.ts +++ b/packages/graphql/tests/tck/subscriptions/delete.test.ts @@ -63,7 +63,7 @@ describe("Subscriptions metadata on delete", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "WITH [] AS meta - MATCH (this:\`Movie\`) + MATCH (this:Movie) WHERE this.id = $param0 WITH this, meta + { event: \\"delete\\", id: id(this), properties: { old: this { .* }, new: null }, timestamp: timestamp(), typename: \\"Movie\\" } AS meta CALL { @@ -104,14 +104,14 @@ describe("Subscriptions metadata on delete", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "WITH [] AS meta - MATCH (this:\`Movie\`) + MATCH (this:Movie) WHERE this.id = $param0 WITH this, meta + { event: \\"delete\\", id: id(this), properties: { old: this { .* }, new: null }, timestamp: timestamp(), typename: \\"Movie\\" } AS meta WITH * CALL { WITH * WITH *, [] AS meta - OPTIONAL MATCH (this)<-[this_actors0_relationship:\`ACTED_IN\`]-(this_actors0:Actor) + OPTIONAL MATCH (this)<-[this_actors0_relationship:ACTED_IN]-(this_actors0:Actor) WHERE this_actors0.name = $this_deleteMovies_args_delete_actors0_where_this_actors0param0 WITH this, meta, this_actors0_relationship, collect(DISTINCT this_actors0) AS this_actors0_to_delete CALL { @@ -180,26 +180,26 @@ describe("Subscriptions metadata on delete", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "WITH [] AS meta - MATCH (this:\`Movie\`) + MATCH (this:Movie) WHERE this.id = $param0 WITH this, meta + { event: \\"delete\\", id: id(this), properties: { old: this { .* }, new: null }, timestamp: timestamp(), typename: \\"Movie\\" } AS meta WITH * CALL { WITH * WITH *, [] AS meta - OPTIONAL MATCH (this)<-[this_actors0_relationship:\`ACTED_IN\`]-(this_actors0:Actor) + OPTIONAL MATCH (this)<-[this_actors0_relationship:ACTED_IN]-(this_actors0:Actor) WHERE this_actors0.name = $this_deleteMovies_args_delete_actors0_where_this_actors0param0 WITH * CALL { WITH * WITH *, [] AS meta - OPTIONAL MATCH (this_actors0)-[this_actors0_movies0_relationship:\`ACTED_IN\`]->(this_actors0_movies0:Movie) + OPTIONAL MATCH (this_actors0)-[this_actors0_movies0_relationship:ACTED_IN]->(this_actors0_movies0:Movie) WHERE this_actors0_movies0.id = $this_deleteMovies_args_delete_actors0_delete_movies0_where_this_actors0_movies0param0 WITH * CALL { WITH * WITH *, [] AS meta - OPTIONAL MATCH (this_actors0_movies0)<-[this_actors0_movies0_actors0_relationship:\`ACTED_IN\`]-(this_actors0_movies0_actors0:Actor) + OPTIONAL MATCH (this_actors0_movies0)<-[this_actors0_movies0_actors0_relationship:ACTED_IN]-(this_actors0_movies0_actors0:Actor) WHERE this_actors0_movies0_actors0.name = $this_deleteMovies_args_delete_actors0_delete_movies0_delete_actors0_where_this_actors0_movies0_actors0param0 WITH this, this_actors0, this_actors0_relationship, this_actors0_movies0, this_actors0_movies0_relationship, meta, this_actors0_movies0_actors0_relationship, collect(DISTINCT this_actors0_movies0_actors0) AS this_actors0_movies0_actors0_to_delete CALL { diff --git a/packages/graphql/tests/tck/subscriptions/update.test.ts b/packages/graphql/tests/tck/subscriptions/update.test.ts index 7ff1a51f8c..aa13280592 100644 --- a/packages/graphql/tests/tck/subscriptions/update.test.ts +++ b/packages/graphql/tests/tck/subscriptions/update.test.ts @@ -65,7 +65,7 @@ describe("Subscriptions metadata on update", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "WITH [] AS meta - MATCH (this:\`Movie\`) + MATCH (this:Movie) WHERE this.id = $param0 WITH this { .* } AS oldProps, this, meta CALL { @@ -112,7 +112,7 @@ describe("Subscriptions metadata on update", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "WITH [] AS meta - MATCH (this:\`Movie\`) + MATCH (this:Movie) WHERE this.id = $param0 WITH this { .* } AS oldProps, this, meta CALL { @@ -121,7 +121,7 @@ describe("Subscriptions metadata on update", () => { WITH this, meta CALL { WITH this, meta - MATCH (this)<-[this_acted_in0_relationship:\`ACTED_IN\`]-(this_actors0:Actor) + MATCH (this)<-[this_acted_in0_relationship:ACTED_IN]-(this_actors0:Actor) WHERE this_actors0.name = $updateMovies_args_update_actors0_where_this_actors0param0 WITH this_actors0 { .* } AS oldProps, this, meta, this_actors0 CALL { diff --git a/packages/graphql/tests/tck/types/bigint.test.ts b/packages/graphql/tests/tck/types/bigint.test.ts index 05869a2ed2..1fa9fd566a 100644 --- a/packages/graphql/tests/tck/types/bigint.test.ts +++ b/packages/graphql/tests/tck/types/bigint.test.ts @@ -51,7 +51,7 @@ describe("Cypher BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`File\`) + "MATCH (this:File) WHERE this.size = $param0 RETURN this { .name } AS this" `); @@ -78,7 +78,7 @@ describe("Cypher BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`File\`) + "MATCH (this:File) WHERE this.size = $param0 RETURN this { .name } AS this" `); @@ -107,7 +107,7 @@ describe("Cypher BigInt", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`File\`) + "MATCH (this:File) WHERE this.size = $param0 RETURN this { .name } AS this" `); diff --git a/packages/graphql/tests/tck/types/date.test.ts b/packages/graphql/tests/tck/types/date.test.ts index a753a08b3d..d381d67d28 100644 --- a/packages/graphql/tests/tck/types/date.test.ts +++ b/packages/graphql/tests/tck/types/date.test.ts @@ -51,7 +51,7 @@ describe("Cypher Date", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.date = $param0 RETURN this { .date } AS this" `); @@ -79,7 +79,7 @@ describe("Cypher Date", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.date >= $param0 RETURN this { .date } AS this" `); @@ -112,7 +112,7 @@ describe("Cypher Date", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`Movie\`) + CREATE (create_this1:Movie) SET create_this1.date = create_var0.date RETURN create_this1 @@ -151,7 +151,7 @@ describe("Cypher Date", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) SET this.date = $this_update_date RETURN collect(DISTINCT this { .id, .date }) AS data" `); diff --git a/packages/graphql/tests/tck/types/datetime.test.ts b/packages/graphql/tests/tck/types/datetime.test.ts index d5739f6a41..fd096a41ce 100644 --- a/packages/graphql/tests/tck/types/datetime.test.ts +++ b/packages/graphql/tests/tck/types/datetime.test.ts @@ -51,7 +51,7 @@ describe("Cypher DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.datetime = $param0 RETURN this { datetime: apoc.date.convertFormat(toString(this.datetime), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } AS this" `); @@ -89,7 +89,7 @@ describe("Cypher DateTime", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`Movie\`) + CREATE (create_this1:Movie) SET create_this1.datetime = create_var0.datetime RETURN create_this1 @@ -133,7 +133,7 @@ describe("Cypher DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) SET this.datetime = $this_update_datetime RETURN collect(DISTINCT this { .id, datetime: apoc.date.convertFormat(toString(this.datetime), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") }) AS data" `); diff --git a/packages/graphql/tests/tck/types/duration.test.ts b/packages/graphql/tests/tck/types/duration.test.ts index 62ba185cf9..f25c2ebaca 100644 --- a/packages/graphql/tests/tck/types/duration.test.ts +++ b/packages/graphql/tests/tck/types/duration.test.ts @@ -51,7 +51,7 @@ describe("Cypher Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.duration = $param0 RETURN this { .duration } AS this" `); @@ -86,7 +86,7 @@ describe("Cypher Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE (datetime() + this.duration) >= (datetime() + $param0) RETURN this { .duration } AS this" `); @@ -126,7 +126,7 @@ describe("Cypher Duration", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`Movie\`) + CREATE (create_this1:Movie) SET create_this1.duration = create_var0.duration RETURN create_this1 @@ -172,7 +172,7 @@ describe("Cypher Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) SET this.duration = $this_update_duration RETURN collect(DISTINCT this { .id, .duration }) AS data" `); diff --git a/packages/graphql/tests/tck/types/localdatetime.test.ts b/packages/graphql/tests/tck/types/localdatetime.test.ts index b0eb9362f6..56a8b7885e 100644 --- a/packages/graphql/tests/tck/types/localdatetime.test.ts +++ b/packages/graphql/tests/tck/types/localdatetime.test.ts @@ -51,7 +51,7 @@ describe("Cypher LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.localDT = $param0 RETURN this { .localDT } AS this" `); @@ -83,7 +83,7 @@ describe("Cypher LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.localDT >= $param0 RETURN this { .localDT } AS this" `); @@ -120,7 +120,7 @@ describe("Cypher LocalDateTime", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`Movie\`) + CREATE (create_this1:Movie) SET create_this1.localDT = create_var0.localDT RETURN create_this1 @@ -163,7 +163,7 @@ describe("Cypher LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) SET this.localDT = $this_update_localDT RETURN collect(DISTINCT this { .id, .localDT }) AS data" `); diff --git a/packages/graphql/tests/tck/types/localtime.test.ts b/packages/graphql/tests/tck/types/localtime.test.ts index a8c90536ea..308d8ffcaa 100644 --- a/packages/graphql/tests/tck/types/localtime.test.ts +++ b/packages/graphql/tests/tck/types/localtime.test.ts @@ -51,7 +51,7 @@ describe("Cypher LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.time = $param0 RETURN this { .time } AS this" `); @@ -80,7 +80,7 @@ describe("Cypher LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.time >= $param0 RETURN this { .time } AS this" `); @@ -114,7 +114,7 @@ describe("Cypher LocalTime", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`Movie\`) + CREATE (create_this1:Movie) SET create_this1.time = create_var0.time RETURN create_this1 @@ -154,7 +154,7 @@ describe("Cypher LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) SET this.time = $this_update_time RETURN collect(DISTINCT this { .id, .time }) AS data" `); diff --git a/packages/graphql/tests/tck/types/point.test.ts b/packages/graphql/tests/tck/types/point.test.ts index f463409a79..1078ae7728 100644 --- a/packages/graphql/tests/tck/types/point.test.ts +++ b/packages/graphql/tests/tck/types/point.test.ts @@ -55,7 +55,7 @@ describe("Cypher Points", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`PointContainer\`) + "MATCH (this:PointContainer) WHERE this.point = point($param0) RETURN this { point: CASE WHEN this.point IS NOT NULL THEN { point: this.point, crs: this.point.crs } @@ -88,7 +88,7 @@ describe("Cypher Points", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`PointContainer\`) + "MATCH (this:PointContainer) WHERE NOT (this.point = point($param0)) RETURN this { point: CASE WHEN this.point IS NOT NULL THEN { point: this.point } @@ -122,7 +122,7 @@ describe("Cypher Points", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`PointContainer\`) + "MATCH (this:PointContainer) WHERE this.point IN [var0 IN $param0 | point(var0)] RETURN this { point: CASE WHEN this.point IS NOT NULL THEN { point: this.point, crs: this.point.crs } @@ -158,7 +158,7 @@ describe("Cypher Points", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`PointContainer\`) + "MATCH (this:PointContainer) WHERE NOT (this.point IN [var0 IN $param0 | point(var0)]) RETURN this { point: CASE WHEN this.point IS NOT NULL THEN { point: this.point, crs: this.point.crs } @@ -194,7 +194,7 @@ describe("Cypher Points", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`PointContainer\`) + "MATCH (this:PointContainer) WHERE point.distance(this.point, point($param0.point)) < $param0.distance RETURN this { point: CASE WHEN this.point IS NOT NULL THEN { point: this.point } @@ -230,7 +230,7 @@ describe("Cypher Points", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`PointContainer\`) + "MATCH (this:PointContainer) WHERE point.distance(this.point, point($param0.point)) <= $param0.distance RETURN this { point: CASE WHEN this.point IS NOT NULL THEN { point: this.point } @@ -266,7 +266,7 @@ describe("Cypher Points", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`PointContainer\`) + "MATCH (this:PointContainer) WHERE point.distance(this.point, point($param0.point)) > $param0.distance RETURN this { point: CASE WHEN this.point IS NOT NULL THEN { point: this.point } @@ -302,7 +302,7 @@ describe("Cypher Points", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`PointContainer\`) + "MATCH (this:PointContainer) WHERE point.distance(this.point, point($param0.point)) >= $param0.distance RETURN this { point: CASE WHEN this.point IS NOT NULL THEN { point: this.point } @@ -340,7 +340,7 @@ describe("Cypher Points", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`PointContainer\`) + "MATCH (this:PointContainer) WHERE point.distance(this.point, point($param0.point)) = $param0.distance RETURN this { point: CASE WHEN this.point IS NOT NULL THEN { point: this.point } @@ -383,7 +383,7 @@ describe("Cypher Points", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`PointContainer\`) + CREATE (create_this1:PointContainer) SET create_this1.point = point(create_var0.point) RETURN create_this1 @@ -427,7 +427,7 @@ describe("Cypher Points", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`PointContainer\`) + "MATCH (this:PointContainer) WHERE this.id = $param0 SET this.point = point($this_update_point) RETURN collect(DISTINCT this { point: CASE diff --git a/packages/graphql/tests/tck/types/points.test.ts b/packages/graphql/tests/tck/types/points.test.ts index c2c9878442..b345cab8b3 100644 --- a/packages/graphql/tests/tck/types/points.test.ts +++ b/packages/graphql/tests/tck/types/points.test.ts @@ -55,7 +55,7 @@ describe("Cypher Points", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`PointContainer\`) + "MATCH (this:PointContainer) WHERE this.points = [var0 IN $param0 | point(var0)] RETURN this { points: CASE WHEN this.points IS NOT NULL THEN [var1 IN this.points | { point: var1, crs: var1.crs }] @@ -90,7 +90,7 @@ describe("Cypher Points", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`PointContainer\`) + "MATCH (this:PointContainer) WHERE NOT (this.points = [var0 IN $param0 | point(var0)]) RETURN this { points: CASE WHEN this.points IS NOT NULL THEN [var1 IN this.points | { point: var1 }] @@ -126,7 +126,7 @@ describe("Cypher Points", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`PointContainer\`) + "MATCH (this:PointContainer) WHERE point($param0) IN this.points RETURN this { points: CASE WHEN this.points IS NOT NULL THEN [var0 IN this.points | { point: var0, crs: var0.crs }] @@ -160,7 +160,7 @@ describe("Cypher Points", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`PointContainer\`) + "MATCH (this:PointContainer) WHERE NOT (point($param0) IN this.points) RETURN this { points: CASE WHEN this.points IS NOT NULL THEN [var0 IN this.points | { point: var0, crs: var0.crs }] @@ -199,7 +199,7 @@ describe("Cypher Points", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`PointContainer\`) + CREATE (create_this1:PointContainer) SET create_this1.points = [create_var2 IN create_var0.points | point(create_var2)] RETURN create_this1 @@ -245,7 +245,7 @@ describe("Cypher Points", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`PointContainer\`) + "MATCH (this:PointContainer) WHERE this.id = $param0 SET this.points = [p in $this_update_points | point(p)] RETURN collect(DISTINCT this { points: CASE diff --git a/packages/graphql/tests/tck/types/time.test.ts b/packages/graphql/tests/tck/types/time.test.ts index 90ae904091..9aadcc7199 100644 --- a/packages/graphql/tests/tck/types/time.test.ts +++ b/packages/graphql/tests/tck/types/time.test.ts @@ -51,7 +51,7 @@ describe("Cypher Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.time = $param0 RETURN this { .time } AS this" `); @@ -81,7 +81,7 @@ describe("Cypher Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.time >= $param0 RETURN this { .time } AS this" `); @@ -116,7 +116,7 @@ describe("Cypher Time", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`Movie\`) + CREATE (create_this1:Movie) SET create_this1.time = create_var0.time RETURN create_this1 @@ -157,7 +157,7 @@ describe("Cypher Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) SET this.time = $this_update_time RETURN collect(DISTINCT this { .id, .time }) AS data" `); @@ -193,7 +193,7 @@ describe("Cypher Time", () => { "UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 - CREATE (create_this1:\`Movie\`) + CREATE (create_this1:Movie) SET create_this1.time = create_var0.time RETURN create_this1 diff --git a/packages/graphql/tests/tck/undirected-relationships/query-direction-aggregations.test.ts b/packages/graphql/tests/tck/undirected-relationships/query-direction-aggregations.test.ts index 834231fbe4..12f11d9dd0 100644 --- a/packages/graphql/tests/tck/undirected-relationships/query-direction-aggregations.test.ts +++ b/packages/graphql/tests/tck/undirected-relationships/query-direction-aggregations.test.ts @@ -51,10 +51,10 @@ describe("QueryDirection in relationships aggregations", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) CALL { WITH this - MATCH (this)-[this0:\`FRIENDS_WITH\`]-(this1:\`User\`) + MATCH (this)-[this0:FRIENDS_WITH]-(this1:User) RETURN count(this1) AS var2 } RETURN this { friendsAggregate: { count: var2 } } AS this" @@ -86,10 +86,10 @@ describe("QueryDirection in relationships aggregations", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) CALL { WITH this - MATCH (this)-[this0:\`FRIENDS_WITH\`]->(this1:\`User\`) + MATCH (this)-[this0:FRIENDS_WITH]->(this1:User) RETURN count(this1) AS var2 } RETURN this { friendsAggregate: { count: var2 } } AS this" @@ -121,10 +121,10 @@ describe("QueryDirection in relationships aggregations", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) CALL { WITH this - MATCH (this)-[this0:\`FRIENDS_WITH\`]-(this1:\`User\`) + MATCH (this)-[this0:FRIENDS_WITH]-(this1:User) RETURN count(this1) AS var2 } RETURN this { friendsAggregate: { count: var2 } } AS this" diff --git a/packages/graphql/tests/tck/undirected-relationships/query-direction-connection.test.ts b/packages/graphql/tests/tck/undirected-relationships/query-direction-connection.test.ts index 7490fae8f6..f2053dab07 100644 --- a/packages/graphql/tests/tck/undirected-relationships/query-direction-connection.test.ts +++ b/packages/graphql/tests/tck/undirected-relationships/query-direction-connection.test.ts @@ -51,10 +51,10 @@ describe("QueryDirection in relationships connection", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) CALL { WITH this - MATCH (this)-[this0:\`FRIENDS_WITH\`]-(this1:\`User\`) + MATCH (this)-[this0:FRIENDS_WITH]-(this1:User) WITH { node: { __resolveType: \\"User\\", __id: id(this1) } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount @@ -90,10 +90,10 @@ describe("QueryDirection in relationships connection", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) CALL { WITH this - MATCH (this)-[this0:\`FRIENDS_WITH\`]->(this1:\`User\`) + MATCH (this)-[this0:FRIENDS_WITH]->(this1:User) WITH { node: { __resolveType: \\"User\\", __id: id(this1) } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount @@ -128,10 +128,10 @@ describe("QueryDirection in relationships connection", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) CALL { WITH this - MATCH (this)-[this0:\`FRIENDS_WITH\`]-(this1:\`User\`) + MATCH (this)-[this0:FRIENDS_WITH]-(this1:User) WITH { node: { __resolveType: \\"User\\", __id: id(this1) } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount diff --git a/packages/graphql/tests/tck/undirected-relationships/query-direction.test.ts b/packages/graphql/tests/tck/undirected-relationships/query-direction.test.ts index fc55a4bfbf..987103388c 100644 --- a/packages/graphql/tests/tck/undirected-relationships/query-direction.test.ts +++ b/packages/graphql/tests/tck/undirected-relationships/query-direction.test.ts @@ -55,16 +55,16 @@ describe("QueryDirection in relationships", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) CALL { WITH this - MATCH (this)-[this0:\`FRIENDS_WITH\`]-(this1:\`User\`) + MATCH (this)-[this0:FRIENDS_WITH]-(this1:User) WITH this1 { .name } AS this1 RETURN collect(this1) AS var2 } CALL { WITH this - MATCH (this)-[this3:\`FRIENDS_WITH\`]->(this4:\`User\`) + MATCH (this)-[this3:FRIENDS_WITH]->(this4:User) WITH this4 { .name } AS this4 RETURN collect(this4) AS var5 } @@ -102,16 +102,16 @@ describe("QueryDirection in relationships", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) CALL { WITH this - MATCH (this)-[this0:\`FRIENDS_WITH\`]->(this1:\`User\`) + MATCH (this)-[this0:FRIENDS_WITH]->(this1:User) WITH this1 { .name } AS this1 RETURN collect(this1) AS var2 } CALL { WITH this - MATCH (this)-[this3:\`FRIENDS_WITH\`]-(this4:\`User\`) + MATCH (this)-[this3:FRIENDS_WITH]-(this4:User) WITH this4 { .name } AS this4 RETURN collect(this4) AS var5 } @@ -146,10 +146,10 @@ describe("QueryDirection in relationships", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) CALL { WITH this - MATCH (this)-[this0:\`FRIENDS_WITH\`]->(this1:\`User\`) + MATCH (this)-[this0:FRIENDS_WITH]->(this1:User) WITH this1 { .name } AS this1 RETURN collect(this1) AS var2 } @@ -183,10 +183,10 @@ describe("QueryDirection in relationships", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) CALL { WITH this - MATCH (this)-[this0:\`FRIENDS_WITH\`]-(this1:\`User\`) + MATCH (this)-[this0:FRIENDS_WITH]-(this1:User) WITH this1 { .name } AS this1 RETURN collect(this1) AS var2 } diff --git a/packages/graphql/tests/tck/undirected-relationships/undirected-aggregations.test.ts b/packages/graphql/tests/tck/undirected-relationships/undirected-aggregations.test.ts index ed67308cf3..ed65bc9543 100644 --- a/packages/graphql/tests/tck/undirected-relationships/undirected-aggregations.test.ts +++ b/packages/graphql/tests/tck/undirected-relationships/undirected-aggregations.test.ts @@ -50,10 +50,10 @@ describe("Undirected Aggregations", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) CALL { WITH this - MATCH (this)-[this0:\`FRIENDS_WITH\`]-(this1:\`User\`) + MATCH (this)-[this0:FRIENDS_WITH]-(this1:User) RETURN count(this1) AS var2 } RETURN this { friendsAggregate: { count: var2 } } AS this" diff --git a/packages/graphql/tests/tck/undirected-relationships/undirected-connection.test.ts b/packages/graphql/tests/tck/undirected-relationships/undirected-connection.test.ts index 522bc1930a..91c8546916 100644 --- a/packages/graphql/tests/tck/undirected-relationships/undirected-connection.test.ts +++ b/packages/graphql/tests/tck/undirected-relationships/undirected-connection.test.ts @@ -50,10 +50,10 @@ describe("Undirected connections", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) CALL { WITH this - MATCH (this)-[this0:\`FRIENDS_WITH\`]-(this1:\`User\`) + MATCH (this)-[this0:FRIENDS_WITH]-(this1:User) WITH { node: { __resolveType: \\"User\\", __id: id(this1) } } AS edge WITH collect(edge) AS edges WITH edges, size(edges) AS totalCount diff --git a/packages/graphql/tests/tck/undirected-relationships/undirected-relationships.test.ts b/packages/graphql/tests/tck/undirected-relationships/undirected-relationships.test.ts index 155bece745..1a9a564b5c 100644 --- a/packages/graphql/tests/tck/undirected-relationships/undirected-relationships.test.ts +++ b/packages/graphql/tests/tck/undirected-relationships/undirected-relationships.test.ts @@ -54,16 +54,16 @@ describe("Undirected relationships", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) CALL { WITH this - MATCH (this)-[this0:\`FRIENDS_WITH\`]-(this1:\`User\`) + MATCH (this)-[this0:FRIENDS_WITH]-(this1:User) WITH this1 { .name } AS this1 RETURN collect(this1) AS var2 } CALL { WITH this - MATCH (this)-[this3:\`FRIENDS_WITH\`]->(this4:\`User\`) + MATCH (this)-[this3:FRIENDS_WITH]->(this4:User) WITH this4 { .name } AS this4 RETURN collect(this4) AS var5 } @@ -113,17 +113,17 @@ describe("Undirected relationships", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`User\`) + "MATCH (this:User) CALL { WITH this CALL { WITH * - MATCH (this)-[this0:\`HAS_CONTENT\`]-(this1:\`Blog\`) + MATCH (this)-[this0:HAS_CONTENT]-(this1:Blog) WITH this1 { __resolveType: \\"Blog\\", __id: id(this), .title } AS this1 RETURN this1 AS var2 UNION WITH * - MATCH (this)-[this3:\`HAS_CONTENT\`]-(this4:\`Post\`) + MATCH (this)-[this3:HAS_CONTENT]-(this4:Post) WITH this4 { __resolveType: \\"Post\\", __id: id(this), .content } AS this4 RETURN this4 AS var2 } @@ -181,17 +181,17 @@ describe("Undirected relationships", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Actor\`) + "MATCH (this:Actor) CALL { WITH this CALL { WITH * - MATCH (this)-[this0:\`ACTED_IN\`]-(this1:\`Movie\`) + MATCH (this)-[this0:ACTED_IN]-(this1:Movie) WITH this1 { __resolveType: \\"Movie\\", __id: id(this), .title } AS this1 RETURN this1 AS var2 UNION WITH * - MATCH (this)-[this3:\`ACTED_IN\`]-(this4:\`Series\`) + MATCH (this)-[this3:ACTED_IN]-(this4:Series) WITH this4 { __resolveType: \\"Series\\", __id: id(this), .title } AS this4 RETURN this4 AS var2 } @@ -239,13 +239,13 @@ describe("Undirected relationships", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Foo\`) + "MATCH (this:Foo) CALL { WITH this - MATCH (this)-[this0:\`DRINKS_AT\`]->(this1:\`Bar\`) + MATCH (this)-[this0:DRINKS_AT]->(this1:Bar) CALL { WITH this1 - MATCH (this1)-[this2:\`DRINKS_AT\`]-(this3:\`Foo\`) + MATCH (this1)-[this2:DRINKS_AT]-(this3:Foo) WITH this3 { .Name } AS this3 RETURN collect(this3) AS var4 } diff --git a/packages/graphql/tests/tck/union.test.ts b/packages/graphql/tests/tck/union.test.ts index 0c6285e9b2..24e66bf3ed 100644 --- a/packages/graphql/tests/tck/union.test.ts +++ b/packages/graphql/tests/tck/union.test.ts @@ -73,18 +73,18 @@ describe("Cypher Union", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this CALL { WITH * - MATCH (this)-[this0:\`SEARCH\`]->(this1:\`Genre\`) + MATCH (this)-[this0:SEARCH]->(this1:Genre) WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this1.name = coalesce($jwt.jwtAllowedNamesExample, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this1 { __resolveType: \\"Genre\\", __id: id(this), .name } AS this1 RETURN this1 AS var2 UNION WITH * - MATCH (this)-[this3:\`SEARCH\`]->(this4:\`Movie\`) + MATCH (this)-[this3:SEARCH]->(this4:Movie) WITH this4 { __resolveType: \\"Movie\\", __id: id(this), .title } AS this4 RETURN this4 AS var2 } @@ -123,18 +123,18 @@ describe("Cypher Union", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CALL { WITH this CALL { WITH * - MATCH (this)-[this0:\`SEARCH\`]->(this1:\`Genre\`) + MATCH (this)-[this0:SEARCH]->(this1:Genre) WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this1.name = coalesce($jwt.jwtAllowedNamesExample, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this1 { __resolveType: \\"Genre\\", __id: id(this), .name } AS this1 RETURN this1 AS var2 UNION WITH * - MATCH (this)-[this3:\`SEARCH\`]->(this4:\`Movie\`) + MATCH (this)-[this3:SEARCH]->(this4:Movie) WITH this4 { __resolveType: \\"Movie\\", __id: id(this) } AS this4 RETURN this4 AS var2 } @@ -179,19 +179,19 @@ describe("Cypher Union", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this CALL { WITH * - MATCH (this)-[this0:\`SEARCH\`]->(this1:\`Genre\`) + MATCH (this)-[this0:SEARCH]->(this1:Genre) WHERE (this1.name = $param1 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND this1.name = coalesce($jwt.jwtAllowedNamesExample, $jwtDefault)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH this1 { __resolveType: \\"Genre\\", __id: id(this), .name } AS this1 RETURN this1 AS var2 UNION WITH * - MATCH (this)-[this3:\`SEARCH\`]->(this4:\`Movie\`) + MATCH (this)-[this3:SEARCH]->(this4:Movie) WHERE this4.title = $param5 WITH this4 { __resolveType: \\"Movie\\", __id: id(this), .title } AS this4 RETURN this4 AS var2 @@ -250,10 +250,10 @@ describe("Cypher Union", () => { WITH this0 CREATE (this0_search_Genre0_node:Genre) SET this0_search_Genre0_node.name = $this0_search_Genre0_node_name - MERGE (this0)-[:\`SEARCH\`]->(this0_search_Genre0_node) + MERGE (this0)-[:SEARCH]->(this0_search_Genre0_node) RETURN this0 } - RETURN [ this0 { .title } ] AS data" + RETURN [this0 { .title }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -280,10 +280,10 @@ describe("Cypher Union", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) CREATE (this_create_search_Genre0_node:Genre) SET this_create_search_Genre0_node.name = $this_create_search_Genre0_node_name - MERGE (this)-[:\`SEARCH\`]->(this_create_search_Genre0_node) + MERGE (this)-[:SEARCH]->(this_create_search_Genre0_node) WITH * RETURN collect(DISTINCT this { .title }) AS data" `); @@ -333,7 +333,7 @@ describe("Cypher Union", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this0 UNWIND connectedNodes as this0_search_Genre_connect0_node - MERGE (this0)-[:\`SEARCH\`]->(this0_search_Genre_connect0_node) + MERGE (this0)-[:SEARCH]->(this0_search_Genre_connect0_node) } } WITH this0, this0_search_Genre_connect0_node @@ -341,7 +341,7 @@ describe("Cypher Union", () => { } RETURN this0 } - RETURN [ this0 { .title } ] AS data" + RETURN [this0 { .title }] AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -378,12 +378,12 @@ describe("Cypher Union", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 WITH this CALL { WITH this - MATCH (this)-[this_search0_relationship:\`SEARCH\`]->(this_search_Genre0:Genre) + MATCH (this)-[this_search0_relationship:SEARCH]->(this_search_Genre0:Genre) WHERE this_search_Genre0.name = $updateMovies_args_update_search_Genre0_where_this_search_Genre0param0 SET this_search_Genre0.name = $this_update_search_Genre0_name RETURN count(*) AS update_this_search_Genre0 @@ -441,12 +441,12 @@ describe("Cypher Union", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_search_Genre0_disconnect0_rel:\`SEARCH\`]->(this_search_Genre0_disconnect0:Genre) + OPTIONAL MATCH (this)-[this_search_Genre0_disconnect0_rel:SEARCH]->(this_search_Genre0_disconnect0:Genre) WHERE this_search_Genre0_disconnect0.name = $updateMovies_args_update_search_Genre0_disconnect0_where_Genre_this_search_Genre0_disconnect0param0 CALL { WITH this_search_Genre0_disconnect0, this_search_Genre0_disconnect0_rel, this @@ -507,12 +507,12 @@ describe("Cypher Union", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 WITH this CALL { WITH this - OPTIONAL MATCH (this)-[this_disconnect_search_Genre0_rel:\`SEARCH\`]->(this_disconnect_search_Genre0:Genre) + OPTIONAL MATCH (this)-[this_disconnect_search_Genre0_rel:SEARCH]->(this_disconnect_search_Genre0:Genre) WHERE this_disconnect_search_Genre0.name = $updateMovies_args_disconnect_search_Genre0_where_Genre_this_disconnect_search_Genre0param0 CALL { WITH this_disconnect_search_Genre0, this_disconnect_search_Genre0_rel, this @@ -570,7 +570,7 @@ describe("Cypher Union", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 WITH this CALL { @@ -584,7 +584,7 @@ describe("Cypher Union", () => { WITH connectedNodes, parentNodes UNWIND parentNodes as this UNWIND connectedNodes as this_connect_search_Genre0_node - MERGE (this)-[:\`SEARCH\`]->(this_connect_search_Genre0_node) + MERGE (this)-[:SEARCH]->(this_connect_search_Genre0_node) } } WITH this, this_connect_search_Genre0_node @@ -621,12 +621,12 @@ describe("Cypher Union", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 WITH * CALL { WITH * - OPTIONAL MATCH (this)-[this_delete_search_Genre0_relationship:\`SEARCH\`]->(this_delete_search_Genre0:Genre) + OPTIONAL MATCH (this)-[this_delete_search_Genre0_relationship:SEARCH]->(this_delete_search_Genre0:Genre) WHERE this_delete_search_Genre0.name = $updateMovies_args_delete_search_Genre0_where_this_delete_search_Genre0param0 WITH this_delete_search_Genre0_relationship, collect(DISTINCT this_delete_search_Genre0) AS this_delete_search_Genre0_to_delete CALL { diff --git a/packages/graphql/tests/tck/where.test.ts b/packages/graphql/tests/tck/where.test.ts index f76371758d..97cdcd07a4 100644 --- a/packages/graphql/tests/tck/where.test.ts +++ b/packages/graphql/tests/tck/where.test.ts @@ -60,7 +60,7 @@ describe("Cypher WHERE", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE (this.title = $param0 AND this.isFavorite = $param1) RETURN this { .title } AS this" `); @@ -85,7 +85,7 @@ describe("Cypher WHERE", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 RETURN this { .title } AS this" `); @@ -109,7 +109,7 @@ describe("Cypher WHERE", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE (this.title = $param0 AND this.isFavorite = $param1) RETURN this { .title } AS this" `); @@ -134,7 +134,7 @@ describe("Cypher WHERE", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 RETURN this { .title } AS this" `); @@ -158,7 +158,7 @@ describe("Cypher WHERE", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE (this.title = $param0 AND this.title = $param1) RETURN this { .title } AS this" `); @@ -183,7 +183,7 @@ describe("Cypher WHERE", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE ((this.title = $param0 OR this.isFavorite = $param1) AND this.id = $param2) RETURN this { .title } AS this" `); @@ -209,7 +209,7 @@ describe("Cypher WHERE", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 RETURN this { .title } AS this" `); @@ -233,7 +233,7 @@ describe("Cypher WHERE", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 RETURN this { .title } AS this" `); @@ -257,7 +257,7 @@ describe("Cypher WHERE", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 RETURN this { .title } AS this" `); @@ -281,7 +281,7 @@ describe("Cypher WHERE", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title = $param0 RETURN this { .title } AS this" `); @@ -306,7 +306,7 @@ describe("Cypher WHERE", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title IS NULL RETURN this { .title } AS this" `); @@ -326,7 +326,7 @@ describe("Cypher WHERE", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE this.title IS NOT NULL RETURN this { .title } AS this" `); @@ -347,7 +347,7 @@ describe("Cypher WHERE", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE NOT (this.title = $param0) RETURN this { .title } AS this" `); @@ -371,7 +371,7 @@ describe("Cypher WHERE", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:\`Movie\`) + "MATCH (this:Movie) WHERE NOT (this.title = $param0 AND this.isFavorite = $param1) RETURN this { .title } AS this" `); diff --git a/yarn.lock b/yarn.lock index 41e5f72b4e..eb1246afaf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3737,10 +3737,10 @@ __metadata: languageName: node linkType: hard -"@neo4j/cypher-builder@npm:~0.6.0": - version: 0.6.0 - resolution: "@neo4j/cypher-builder@npm:0.6.0" - checksum: a0a335fce133a10b095da8ef309517fd8c7f028e360416991edaf2c4ad4715ab1c097b2a34803fd9bb54f81ea1a10f2b7f68cca8b40ddbe7b787e4a8e5a41e23 +"@neo4j/cypher-builder@npm:^1.0.0": + version: 1.0.0 + resolution: "@neo4j/cypher-builder@npm:1.0.0" + checksum: 735efc31fcd195a478bb7f357afb49a262ad45f239875639454a9b3ca2e77e0a1f3a3ac0d5859e73c98c2529b240632fb9893f199c9ff61d1164c67c34823e4d languageName: node linkType: hard @@ -3904,7 +3904,7 @@ __metadata: "@graphql-tools/resolvers-composition": ^7.0.0 "@graphql-tools/schema": 10.0.0 "@graphql-tools/utils": ^10.0.0 - "@neo4j/cypher-builder": ~0.6.0 + "@neo4j/cypher-builder": ^1.0.0 "@neo4j/graphql-plugin-auth": ^2.2.0 "@types/deep-equal": 1.0.1 "@types/is-uuid": 1.0.0