diff --git a/.changeset/kind-clocks-tickle.md b/.changeset/kind-clocks-tickle.md new file mode 100644 index 0000000000..034bc44340 --- /dev/null +++ b/.changeset/kind-clocks-tickle.md @@ -0,0 +1,34 @@ +--- +"@neo4j/graphql": major +--- + +Sets addVersionPrefix to true by default, this will prepend the Cypher version to all queries by default, ensuring that the correct Cypher version is used in Neo4j: + +```cypher +CYPHER 5 +MATCH(this:Movie) +``` + +This may be incompatible with older versions of Neo4j and can be disabled by setting `cypherQueryOption.addVersionPrefix` in the context to false: + +```js +{ + cypherQueryOptions: { + addVersionPrefix: true, + }, +} +``` + +For example, for an apollo server: + +```js +await startStandaloneServer(server, { + context: async ({ req }) => ({ + req, + cypherQueryOptions: { + addVersionPrefix: false, + }, + }), + listen: { port: 4000 }, +}); +``` diff --git a/packages/graphql/src/classes/Executor.ts b/packages/graphql/src/classes/Executor.ts index 13f51728b4..39b56b90b5 100644 --- a/packages/graphql/src/classes/Executor.ts +++ b/packages/graphql/src/classes/Executor.ts @@ -184,7 +184,8 @@ export class Executor { } private getCypherVersionStatement(): string { - if (this.cypherQueryOptions?.addVersionPrefix) { + const addVersionPrefixDefault=true + if (this.cypherQueryOptions?.addVersionPrefix ?? addVersionPrefixDefault) { return `CYPHER ${SUPPORTED_CYPHER_VERSION}\n`; } return ""; diff --git a/packages/graphql/src/utils/execute.test.ts b/packages/graphql/src/utils/execute.test.ts index 1496f3166b..095eed8e6b 100644 --- a/packages/graphql/src/utils/execute.test.ts +++ b/packages/graphql/src/utils/execute.test.ts @@ -48,7 +48,7 @@ describe("execute", () => { const tx = { run: (paramCypher, paramParams) => { - expect(paramCypher).toEqual(cypher); + expect(paramCypher).toBe(`CYPHER 5\n${cypher}`); expect(paramParams).toEqual(params); return { records, summary: { counters: { updates: () => ({ test: 1 }) } } }; @@ -126,7 +126,7 @@ describe("execute", () => { const tx = { run: (paramCypher: string, paramParams) => { - expect(trimmer(paramCypher)).toEqual(cypher); + expect(trimmer(paramCypher)).toBe(`CYPHER 5 ${cypher}`); expect(paramParams).toEqual(params); return { records, summary: { counters: { updates: () => ({ test: 1 }) } } }; @@ -189,6 +189,7 @@ describe("execute", () => { `); const expectedCypher = trimmer(` + CYPHER 5 CYPHER runtime=interpreted planner=cost updateStrategy=default expressionEngine=compiled operatorEngine=compiled interpretedPipesFallback=all replan=default CREATE (u:User {title: $title}) RETURN u { .title } as u diff --git a/packages/graphql/tests/integration/config-options/query-options.int.test.ts b/packages/graphql/tests/integration/config-options/query-options.int.test.ts index 3db6adb016..7d46540242 100644 --- a/packages/graphql/tests/integration/config-options/query-options.int.test.ts +++ b/packages/graphql/tests/integration/config-options/query-options.int.test.ts @@ -112,7 +112,7 @@ describe("query options", () => { const result = await testHelper.executeGraphQL(query, { variableValues: { id }, - contextValue: { cypherQueryOptions: { runtime: "interpreted", addVersionPrefix: true } }, + contextValue: { cypherQueryOptions: { runtime: "interpreted", addVersionPrefix: false } }, }); expect(result.errors).toBeFalsy(); diff --git a/packages/graphql/tests/tck/advanced-filtering.test.ts b/packages/graphql/tests/tck/advanced-filtering.test.ts index 05b8cc7e64..e686df3b84 100644 --- a/packages/graphql/tests/tck/advanced-filtering.test.ts +++ b/packages/graphql/tests/tck/advanced-filtering.test.ts @@ -72,7 +72,8 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 RETURN this { .title } AS this" `); @@ -96,7 +97,8 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this._id IN $param0 RETURN this { ._id } AS this" `); @@ -122,7 +124,8 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.id =~ $param0 RETURN this { .id } AS this" `); @@ -146,7 +149,8 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE NOT (this.id = $param0) RETURN this { .id } AS this" `); @@ -170,7 +174,8 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.id CONTAINS $param0 RETURN this { .id } AS this" `); @@ -194,7 +199,8 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.id STARTS WITH $param0 RETURN this { .id } AS this" `); @@ -218,7 +224,8 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.id ENDS WITH $param0 RETURN this { .id } AS this" `); @@ -242,7 +249,8 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.actorCount < $param0 RETURN this { .actorCount } AS this" `); @@ -269,7 +277,8 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.budget < $param0 RETURN this { .budget } AS this" `); @@ -295,7 +304,8 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title < $param0 RETURN this { .title } AS this" `); @@ -319,7 +329,8 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.actorCount <= $param0 RETURN this { .actorCount } AS this" `); @@ -346,7 +357,8 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.budget <= $param0 RETURN this { .budget } AS this" `); @@ -372,7 +384,8 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title <= $param0 RETURN this { .title } AS this" `); @@ -396,7 +409,8 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.actorCount > $param0 RETURN this { .actorCount } AS this" `); @@ -423,7 +437,8 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.budget > $param0 RETURN this { .budget } AS this" `); @@ -449,7 +464,8 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title > $param0 RETURN this { .title } AS this" `); @@ -473,7 +489,8 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.actorCount >= $param0 RETURN this { .actorCount } AS this" `); @@ -500,7 +517,8 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.budget >= $param0 RETURN this { .budget } AS this" `); @@ -526,7 +544,8 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title >= $param0 RETURN this { .title } AS this" `); @@ -551,7 +570,8 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE EXISTS { MATCH (this)-[:IN_GENRE]->(this0:Genre) WHERE this0.name = $param0 @@ -583,7 +603,8 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE (EXISTS { MATCH (this)-[:IN_GENRE]->(this0:Genre) WHERE this0.name = $param0 @@ -606,7 +627,8 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE NOT (EXISTS { MATCH (this)-[:IN_GENRE]->(this0:Genre) WHERE this0.name = $param0 @@ -626,7 +648,8 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE single(this0 IN [(this)-[:IN_GENRE]->(this0:Genre) WHERE this0.name = $param0 | 1] WHERE true) RETURN this { .actorCount } AS this" `); @@ -642,7 +665,8 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE EXISTS { MATCH (this)-[:IN_GENRE]->(this0:Genre) WHERE this0.name = $param0 @@ -671,7 +695,8 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE EXISTS { MATCH (this)-[this0:IN_GENRE]->(this1:Genre) WHERE this1.name = $param0 @@ -698,7 +723,8 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE NOT (EXISTS { MATCH (this)-[this0:IN_GENRE]->(this1:Genre) WHERE this1.name = $param0 @@ -730,7 +756,8 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE (EXISTS { MATCH (this)-[this0:IN_GENRE]->(this1:Genre) WHERE this1.name = $param0 @@ -752,7 +779,8 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE NOT (EXISTS { MATCH (this)-[this0:IN_GENRE]->(this1:Genre) WHERE this1.name = $param0 @@ -771,7 +799,8 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + 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" `); @@ -787,7 +816,8 @@ describe("Cypher Advanced Filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE EXISTS { MATCH (this)-[this0:IN_GENRE]->(this1:Genre) WHERE this1.name = $param0 diff --git a/packages/graphql/tests/tck/aggregations/alias-directive.test.ts b/packages/graphql/tests/tck/aggregations/alias-directive.test.ts index fe43341771..8568717cf7 100644 --- a/packages/graphql/tests/tck/aggregations/alias-directive.test.ts +++ b/packages/graphql/tests/tck/aggregations/alias-directive.test.ts @@ -63,7 +63,8 @@ describe("Cypher Aggregations Many with Alias directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) WITH this ORDER BY size(this._title) DESC diff --git a/packages/graphql/tests/tck/aggregations/alias.test.ts b/packages/graphql/tests/tck/aggregations/alias.test.ts index d0c2624073..4edc9c337d 100644 --- a/packages/graphql/tests/tck/aggregations/alias.test.ts +++ b/packages/graphql/tests/tck/aggregations/alias.test.ts @@ -64,7 +64,8 @@ describe("Cypher Aggregations Many while Alias fields", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) RETURN count(this) AS var0 } diff --git a/packages/graphql/tests/tck/aggregations/auth.test.ts b/packages/graphql/tests/tck/aggregations/auth.test.ts index 03a3551f3c..9bd0a1bd1c 100644 --- a/packages/graphql/tests/tck/aggregations/auth.test.ts +++ b/packages/graphql/tests/tck/aggregations/auth.test.ts @@ -81,7 +81,8 @@ describe("Cypher Aggregations with Auth", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:User) WHERE (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN count(this) AS var0 @@ -113,7 +114,8 @@ describe("Cypher Aggregations with Auth", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:User) WHERE (this.name = $param0 AND ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN count(this) AS var0 @@ -149,7 +151,8 @@ describe("Cypher Aggregations with Auth", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:User) WHERE (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN { min: min(this.imdbRatingInt), max: max(this.imdbRatingInt) } AS var0 @@ -184,7 +187,8 @@ describe("Cypher Aggregations with Auth", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:User) WHERE (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN { min: min(this.imdbRatingFloat), max: max(this.imdbRatingFloat) } AS var0 @@ -219,7 +223,8 @@ describe("Cypher Aggregations with Auth", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:User) WHERE (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN { min: min(this.imdbRatingBigInt), max: max(this.imdbRatingBigInt) } AS var0 @@ -254,7 +259,8 @@ describe("Cypher Aggregations with Auth", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:User) WHERE (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH this @@ -292,7 +298,8 @@ describe("Cypher Aggregations with Auth", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:User) WHERE (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN { 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\\") } AS var0 diff --git a/packages/graphql/tests/tck/aggregations/bigint.test.ts b/packages/graphql/tests/tck/aggregations/bigint.test.ts index c8ea500b29..15c60f0228 100644 --- a/packages/graphql/tests/tck/aggregations/bigint.test.ts +++ b/packages/graphql/tests/tck/aggregations/bigint.test.ts @@ -50,7 +50,8 @@ describe("Cypher Aggregations BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:File) RETURN { min: min(this.size) } AS var0 } @@ -74,7 +75,8 @@ describe("Cypher Aggregations BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:File) RETURN { max: max(this.size) } AS var0 } @@ -98,7 +100,8 @@ describe("Cypher Aggregations BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:File) RETURN { average: avg(this.size) } AS var0 } @@ -122,7 +125,8 @@ describe("Cypher Aggregations BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:File) RETURN { sum: sum(this.size) } AS var0 } @@ -149,7 +153,8 @@ describe("Cypher Aggregations BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:File) RETURN { min: min(this.size), max: max(this.size), average: avg(this.size), sum: sum(this.size) } AS var0 } diff --git a/packages/graphql/tests/tck/aggregations/count.test.ts b/packages/graphql/tests/tck/aggregations/count.test.ts index 5aef47a2ef..4c4465055f 100644 --- a/packages/graphql/tests/tck/aggregations/count.test.ts +++ b/packages/graphql/tests/tck/aggregations/count.test.ts @@ -48,7 +48,8 @@ describe("Cypher Aggregations Count", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) RETURN count(this) AS var0 } @@ -70,7 +71,8 @@ describe("Cypher Aggregations Count", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) WHERE this.title = $param0 RETURN count(this) AS var0 diff --git a/packages/graphql/tests/tck/aggregations/datetime.test.ts b/packages/graphql/tests/tck/aggregations/datetime.test.ts index 426612fb1a..80ae342332 100644 --- a/packages/graphql/tests/tck/aggregations/datetime.test.ts +++ b/packages/graphql/tests/tck/aggregations/datetime.test.ts @@ -50,7 +50,8 @@ describe("Cypher Aggregations DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) RETURN { min: apoc.date.convertFormat(toString(min(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } AS var0 } @@ -74,7 +75,8 @@ describe("Cypher Aggregations DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) RETURN { max: apoc.date.convertFormat(toString(max(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } AS var0 } @@ -99,7 +101,8 @@ describe("Cypher Aggregations DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) RETURN { 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\\") } AS var0 } diff --git a/packages/graphql/tests/tck/aggregations/duration.test.ts b/packages/graphql/tests/tck/aggregations/duration.test.ts index fb4b33bed2..f512903504 100644 --- a/packages/graphql/tests/tck/aggregations/duration.test.ts +++ b/packages/graphql/tests/tck/aggregations/duration.test.ts @@ -50,7 +50,8 @@ describe("Cypher Aggregations Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) RETURN { min: min(this.screenTime) } AS var0 } @@ -74,7 +75,8 @@ describe("Cypher Aggregations Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) RETURN { max: max(this.screenTime) } AS var0 } @@ -99,7 +101,8 @@ describe("Cypher Aggregations Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) RETURN { min: min(this.screenTime), max: max(this.screenTime) } AS var0 } 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 2b71052e46..1cbb10d85f 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 @@ -65,7 +65,8 @@ describe("Field Level Aggregations Alias", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) @@ -98,7 +99,8 @@ describe("Field Level Aggregations Alias", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) 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 7540c2e398..4e95e22c8c 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 @@ -68,7 +68,8 @@ describe("Field Level Aggregations", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) 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 8adbe2ca97..7cf61e1277 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 @@ -65,7 +65,8 @@ describe("Field Level Aggregations Alias", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Film) + "CYPHER 5 + MATCH (this:Film) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Person) 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 4100ceefd4..8dd6d5de01 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 @@ -60,7 +60,8 @@ describe("Field Level Aggregations Where", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Person) @@ -98,7 +99,8 @@ describe("Field Level Aggregations Where", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Person) 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 5237947c11..f14e151448 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 @@ -59,7 +59,8 @@ describe("Field Level Aggregations", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) @@ -91,7 +92,8 @@ describe("Field Level Aggregations", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) @@ -132,7 +134,8 @@ describe("Field Level Aggregations", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) @@ -164,7 +167,8 @@ describe("Field Level Aggregations", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) @@ -197,7 +201,8 @@ describe("Field Level Aggregations", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this MATCH (this)-[this0:ACTED_IN]->(this1:Movie) @@ -234,7 +239,8 @@ describe("Field Level Aggregations", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) diff --git a/packages/graphql/tests/tck/aggregations/float.test.ts b/packages/graphql/tests/tck/aggregations/float.test.ts index 0963745b80..0f509d0aa1 100644 --- a/packages/graphql/tests/tck/aggregations/float.test.ts +++ b/packages/graphql/tests/tck/aggregations/float.test.ts @@ -50,7 +50,8 @@ describe("Cypher Aggregations Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) RETURN { min: min(this.actorCount) } AS var0 } @@ -74,7 +75,8 @@ describe("Cypher Aggregations Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) RETURN { max: max(this.actorCount) } AS var0 } @@ -98,7 +100,8 @@ describe("Cypher Aggregations Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) RETURN { average: avg(this.actorCount) } AS var0 } @@ -122,7 +125,8 @@ describe("Cypher Aggregations Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) RETURN { sum: sum(this.actorCount) } AS var0 } @@ -149,7 +153,8 @@ describe("Cypher Aggregations Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) RETURN { min: min(this.actorCount), max: max(this.actorCount), average: avg(this.actorCount), sum: sum(this.actorCount) } AS var0 } @@ -177,7 +182,8 @@ describe("Cypher Aggregations Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) RETURN count(this) AS var0 } diff --git a/packages/graphql/tests/tck/aggregations/int.test.ts b/packages/graphql/tests/tck/aggregations/int.test.ts index e5a6235edc..74bf1ee19c 100644 --- a/packages/graphql/tests/tck/aggregations/int.test.ts +++ b/packages/graphql/tests/tck/aggregations/int.test.ts @@ -50,7 +50,8 @@ describe("Cypher Aggregations Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) RETURN { min: min(this.imdbRating) } AS var0 } @@ -74,7 +75,8 @@ describe("Cypher Aggregations Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) RETURN { max: max(this.imdbRating) } AS var0 } @@ -98,7 +100,8 @@ describe("Cypher Aggregations Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) RETURN { average: avg(this.imdbRating) } AS var0 } @@ -122,7 +125,8 @@ describe("Cypher Aggregations Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) RETURN { sum: sum(this.imdbRating) } AS var0 } @@ -149,7 +153,8 @@ describe("Cypher Aggregations Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) RETURN { min: min(this.imdbRating), max: max(this.imdbRating), average: avg(this.imdbRating), sum: sum(this.imdbRating) } AS var0 } diff --git a/packages/graphql/tests/tck/aggregations/label.test.ts b/packages/graphql/tests/tck/aggregations/label.test.ts index 7b462a0b9c..85746101e1 100644 --- a/packages/graphql/tests/tck/aggregations/label.test.ts +++ b/packages/graphql/tests/tck/aggregations/label.test.ts @@ -70,7 +70,8 @@ describe("Cypher Aggregations Many while Alias fields", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Film) WITH this ORDER BY size(this.title) DESC @@ -115,7 +116,8 @@ describe("Cypher Aggregations Many while Alias fields", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Actor:Person:Alien) WITH this ORDER BY size(this.name) DESC diff --git a/packages/graphql/tests/tck/aggregations/localdatetime.test.ts b/packages/graphql/tests/tck/aggregations/localdatetime.test.ts index ad8ef8532b..f4599712e0 100644 --- a/packages/graphql/tests/tck/aggregations/localdatetime.test.ts +++ b/packages/graphql/tests/tck/aggregations/localdatetime.test.ts @@ -50,7 +50,8 @@ describe("Cypher Aggregations LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) RETURN { min: min(this.createdAt) } AS var0 } @@ -74,7 +75,8 @@ describe("Cypher Aggregations LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) RETURN { max: max(this.createdAt) } AS var0 } @@ -99,7 +101,8 @@ describe("Cypher Aggregations LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) RETURN { min: min(this.createdAt), max: max(this.createdAt) } AS var0 } diff --git a/packages/graphql/tests/tck/aggregations/localtime.test.ts b/packages/graphql/tests/tck/aggregations/localtime.test.ts index 689ac314db..e1f8113ace 100644 --- a/packages/graphql/tests/tck/aggregations/localtime.test.ts +++ b/packages/graphql/tests/tck/aggregations/localtime.test.ts @@ -50,7 +50,8 @@ describe("Cypher Aggregations LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) RETURN { min: min(this.createdAt) } AS var0 } @@ -74,7 +75,8 @@ describe("Cypher Aggregations LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) RETURN { max: max(this.createdAt) } AS var0 } @@ -99,7 +101,8 @@ describe("Cypher Aggregations LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) RETURN { min: min(this.createdAt), max: max(this.createdAt) } AS var0 } diff --git a/packages/graphql/tests/tck/aggregations/many.test.ts b/packages/graphql/tests/tck/aggregations/many.test.ts index 98631af1da..ddfa385007 100644 --- a/packages/graphql/tests/tck/aggregations/many.test.ts +++ b/packages/graphql/tests/tck/aggregations/many.test.ts @@ -63,7 +63,8 @@ describe("Cypher Aggregations Many", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) WITH this ORDER BY size(this.title) DESC diff --git a/packages/graphql/tests/tck/aggregations/string.test.ts b/packages/graphql/tests/tck/aggregations/string.test.ts index 3608269907..8c93821e75 100644 --- a/packages/graphql/tests/tck/aggregations/string.test.ts +++ b/packages/graphql/tests/tck/aggregations/string.test.ts @@ -51,7 +51,8 @@ describe("Cypher Aggregations String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) WITH this ORDER BY size(this.title) DESC @@ -78,7 +79,8 @@ describe("Cypher Aggregations String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) WITH this ORDER BY size(this.title) DESC @@ -106,7 +108,8 @@ describe("Cypher Aggregations String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) WITH this ORDER BY size(this.title) DESC @@ -133,7 +136,8 @@ describe("Cypher Aggregations String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) WHERE this.testId = $param0 WITH this diff --git a/packages/graphql/tests/tck/aggregations/time.test.ts b/packages/graphql/tests/tck/aggregations/time.test.ts index 9b333a84de..51efeb0ecb 100644 --- a/packages/graphql/tests/tck/aggregations/time.test.ts +++ b/packages/graphql/tests/tck/aggregations/time.test.ts @@ -50,7 +50,8 @@ describe("Cypher Aggregations Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) RETURN { min: min(this.createdAt) } AS var0 } @@ -74,7 +75,8 @@ describe("Cypher Aggregations Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) RETURN { max: max(this.createdAt) } AS var0 } @@ -99,7 +101,8 @@ describe("Cypher Aggregations Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) RETURN { min: min(this.createdAt), max: max(this.createdAt) } AS var0 } diff --git a/packages/graphql/tests/tck/aggregations/where/count.test.ts b/packages/graphql/tests/tck/aggregations/where/count.test.ts index 98860827ff..ab09e8c45e 100644 --- a/packages/graphql/tests/tck/aggregations/where/count.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/count.test.ts @@ -53,7 +53,8 @@ describe("Cypher Aggregations where with count", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -86,7 +87,8 @@ describe("Cypher Aggregations where with count", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -119,7 +121,8 @@ describe("Cypher Aggregations where with count", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -152,7 +155,8 @@ describe("Cypher Aggregations where with count", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -185,7 +189,8 @@ describe("Cypher Aggregations where with count", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) 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 d5001b6e70..d3d6a8286d 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/bigint.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/bigint.test.ts @@ -58,7 +58,8 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -91,7 +92,8 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -124,7 +126,8 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -157,7 +160,8 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -190,7 +194,8 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -223,7 +228,8 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -256,7 +262,8 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -289,7 +296,8 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -322,7 +330,8 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -355,7 +364,8 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -388,7 +398,8 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -421,7 +432,8 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -454,7 +466,8 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -487,7 +500,8 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -520,7 +534,8 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -553,7 +568,8 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -586,7 +602,8 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -619,7 +636,8 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -652,7 +670,8 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -685,7 +704,8 @@ describe("Cypher Aggregations where edge with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) 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 e3176fa0d9..b272aad9c3 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/datetime.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/datetime.test.ts @@ -60,7 +60,8 @@ describe("Cypher Aggregations where edge with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -92,7 +93,8 @@ describe("Cypher Aggregations where edge with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -124,7 +126,8 @@ describe("Cypher Aggregations where edge with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -156,7 +159,8 @@ describe("Cypher Aggregations where edge with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -188,7 +192,8 @@ describe("Cypher Aggregations where edge with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -220,7 +225,8 @@ describe("Cypher Aggregations where edge with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -252,7 +258,8 @@ describe("Cypher Aggregations where edge with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -284,7 +291,8 @@ describe("Cypher Aggregations where edge with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -316,7 +324,8 @@ describe("Cypher Aggregations where edge with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -348,7 +357,8 @@ describe("Cypher Aggregations where edge with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) 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 3233f8f9d9..3971db945c 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/duration.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/duration.test.ts @@ -58,7 +58,8 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -99,7 +100,8 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -140,7 +142,8 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -181,7 +184,8 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -222,7 +226,8 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -263,7 +268,8 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -304,7 +310,8 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -345,7 +352,8 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -386,7 +394,8 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -427,7 +436,8 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -468,7 +478,8 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -509,7 +520,8 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -550,7 +562,8 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -591,7 +604,8 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -632,7 +646,8 @@ describe("Cypher Aggregations where edge with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) 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 68740a7306..fdcfef8e8c 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/float.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/float.test.ts @@ -58,7 +58,8 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -88,7 +89,8 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -118,7 +120,8 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -148,7 +151,8 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -178,7 +182,8 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -208,7 +213,8 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -238,7 +244,8 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -268,7 +275,8 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -298,7 +306,8 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -328,7 +337,8 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -358,7 +368,8 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -388,7 +399,8 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -418,7 +430,8 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -448,7 +461,8 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -478,7 +492,8 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -508,7 +523,8 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -538,7 +554,8 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -568,7 +585,8 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -598,7 +616,8 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -628,7 +647,8 @@ describe("Cypher Aggregations where edge with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) 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 70dd501922..c90fa3a7a7 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/int.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/int.test.ts @@ -58,7 +58,8 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -88,7 +89,8 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -118,7 +120,8 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -148,7 +151,8 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -178,7 +182,8 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -208,7 +213,8 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -241,7 +247,8 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -274,7 +281,8 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -307,7 +315,8 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -340,7 +349,8 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -373,7 +383,8 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -406,7 +417,8 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -439,7 +451,8 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -472,7 +485,8 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -505,7 +519,8 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -538,7 +553,8 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -571,7 +587,8 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -604,7 +621,8 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -637,7 +655,8 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -670,7 +689,8 @@ describe("Cypher Aggregations where edge with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) diff --git a/packages/graphql/tests/tck/aggregations/where/edge/interface-relationship.test.ts b/packages/graphql/tests/tck/aggregations/where/edge/interface-relationship.test.ts index a1adb49279..cea0106de0 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/interface-relationship.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/interface-relationship.test.ts @@ -79,7 +79,8 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this MATCH (this)-[this0:ACTED_IN]->(this1) @@ -119,7 +120,8 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this0:Actor) CALL { WITH this0 @@ -173,7 +175,8 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this0:Actor) CALL { WITH this0 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 657d07b238..1ff2276856 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/localdatetime.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/localdatetime.test.ts @@ -60,7 +60,8 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -100,7 +101,8 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -140,7 +142,8 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -180,7 +183,8 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -220,7 +224,8 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -260,7 +265,8 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -300,7 +306,8 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -340,7 +347,8 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -380,7 +388,8 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -420,7 +429,8 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) 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 237ee62a7c..68ff7561d7 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/localtime.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/localtime.test.ts @@ -58,7 +58,8 @@ describe("Cypher Aggregations where edge with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -93,7 +94,8 @@ describe("Cypher Aggregations where edge with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -128,7 +130,8 @@ describe("Cypher Aggregations where edge with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -163,7 +166,8 @@ describe("Cypher Aggregations where edge with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -198,7 +202,8 @@ describe("Cypher Aggregations where edge with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -233,7 +238,8 @@ describe("Cypher Aggregations where edge with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -268,7 +274,8 @@ describe("Cypher Aggregations where edge with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -303,7 +310,8 @@ describe("Cypher Aggregations where edge with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -338,7 +346,8 @@ describe("Cypher Aggregations where edge with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -373,7 +382,8 @@ describe("Cypher Aggregations where edge with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) 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 9515709ade..241cfc90bc 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/string.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/string.test.ts @@ -58,7 +58,8 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -91,7 +92,8 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -124,7 +126,8 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -157,7 +160,8 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -190,7 +194,8 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -223,7 +228,8 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -256,7 +262,8 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -289,7 +296,8 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -322,7 +330,8 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -355,7 +364,8 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -388,7 +398,8 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -418,7 +429,8 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -448,7 +460,8 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -478,7 +491,8 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -508,7 +522,8 @@ describe("Cypher Aggregations where edge with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) 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 2a88b1282b..6314488e88 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/time.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/time.test.ts @@ -58,7 +58,8 @@ describe("Cypher Aggregations where edge with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -88,7 +89,8 @@ describe("Cypher Aggregations where edge with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -118,7 +120,8 @@ describe("Cypher Aggregations where edge with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -148,7 +151,8 @@ describe("Cypher Aggregations where edge with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -178,7 +182,8 @@ describe("Cypher Aggregations where edge with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -208,7 +213,8 @@ describe("Cypher Aggregations where edge with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -238,7 +244,8 @@ describe("Cypher Aggregations where edge with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -268,7 +275,8 @@ describe("Cypher Aggregations where edge with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -298,7 +306,8 @@ describe("Cypher Aggregations where edge with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -328,7 +337,8 @@ describe("Cypher Aggregations where edge with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) diff --git a/packages/graphql/tests/tck/aggregations/where/logical.test.ts b/packages/graphql/tests/tck/aggregations/where/logical.test.ts index 5c0d5b2299..b4a82b35c3 100644 --- a/packages/graphql/tests/tck/aggregations/where/logical.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/logical.test.ts @@ -53,7 +53,8 @@ describe("Cypher Aggregations where with logical AND plus OR", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -90,7 +91,8 @@ describe("Cypher Aggregations where with logical AND plus OR", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -127,7 +129,8 @@ describe("Cypher Aggregations where with logical AND plus OR", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -167,7 +170,8 @@ describe("Cypher Aggregations where with logical AND plus OR", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -219,7 +223,8 @@ describe("Cypher Aggregations where with logical AND plus OR", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) 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 c62674a067..7e0c773bb8 100644 --- a/packages/graphql/tests/tck/aggregations/where/node/bigint.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/node/bigint.test.ts @@ -54,7 +54,8 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -87,7 +88,8 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -120,7 +122,8 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -153,7 +156,8 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -186,7 +190,8 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -219,7 +224,8 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -252,7 +258,8 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -285,7 +292,8 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -318,7 +326,8 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -351,7 +360,8 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -384,7 +394,8 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -417,7 +428,8 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -450,7 +462,8 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -483,7 +496,8 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -516,7 +530,8 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -549,7 +564,8 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -582,7 +598,8 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -615,7 +632,8 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -648,7 +666,8 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -681,7 +700,8 @@ describe("Cypher Aggregations where node with BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) 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 953c02b178..80acc84aa7 100644 --- a/packages/graphql/tests/tck/aggregations/where/node/datetime.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/node/datetime.test.ts @@ -56,7 +56,8 @@ describe("Cypher Aggregations where node with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -88,7 +89,8 @@ describe("Cypher Aggregations where node with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -120,7 +122,8 @@ describe("Cypher Aggregations where node with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -152,7 +155,8 @@ describe("Cypher Aggregations where node with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -184,7 +188,8 @@ describe("Cypher Aggregations where node with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -216,7 +221,8 @@ describe("Cypher Aggregations where node with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -248,7 +254,8 @@ describe("Cypher Aggregations where node with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -280,7 +287,8 @@ describe("Cypher Aggregations where node with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -312,7 +320,8 @@ describe("Cypher Aggregations where node with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -344,7 +353,8 @@ describe("Cypher Aggregations where node with DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) 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 48adf11d86..bec8fb66e8 100644 --- a/packages/graphql/tests/tck/aggregations/where/node/duration.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/node/duration.test.ts @@ -54,7 +54,8 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -95,7 +96,8 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -136,7 +138,8 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -177,7 +180,8 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -218,7 +222,8 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -259,7 +264,8 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -300,7 +306,8 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -341,7 +348,8 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -382,7 +390,8 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -423,7 +432,8 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -464,7 +474,8 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -505,7 +516,8 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -546,7 +558,8 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -587,7 +600,8 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -628,7 +642,8 @@ describe("Cypher Aggregations where node with Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) 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 e4e65393d0..61fc49dc78 100644 --- a/packages/graphql/tests/tck/aggregations/where/node/float.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/node/float.test.ts @@ -54,7 +54,8 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -84,7 +85,8 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -114,7 +116,8 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -144,7 +147,8 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -174,7 +178,8 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -204,7 +209,8 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -234,7 +240,8 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -264,7 +271,8 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -294,7 +302,8 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -324,7 +333,8 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -354,7 +364,8 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -384,7 +395,8 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -414,7 +426,8 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -444,7 +457,8 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -474,7 +488,8 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -504,7 +519,8 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -534,7 +550,8 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -564,7 +581,8 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -594,7 +612,8 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -624,7 +643,8 @@ describe("Cypher Aggregations where node with Float", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) 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 cb6c41cd4f..4a1c88d717 100644 --- a/packages/graphql/tests/tck/aggregations/where/node/int.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/node/int.test.ts @@ -54,7 +54,8 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -84,7 +85,8 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -114,7 +116,8 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -144,7 +147,8 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -174,7 +178,8 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -204,7 +209,8 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -237,7 +243,8 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -270,7 +277,8 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -303,7 +311,8 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -336,7 +345,8 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -369,7 +379,8 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -402,7 +413,8 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -435,7 +447,8 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -468,7 +481,8 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -501,7 +515,8 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -534,7 +549,8 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -567,7 +583,8 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -600,7 +617,8 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -633,7 +651,8 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -666,7 +685,8 @@ describe("Cypher Aggregations where node with Int", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) 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 7d14f10ee0..af98b44bc6 100644 --- a/packages/graphql/tests/tck/aggregations/where/node/localdatetime.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/node/localdatetime.test.ts @@ -56,7 +56,8 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -96,7 +97,8 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -136,7 +138,8 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -176,7 +179,8 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -216,7 +220,8 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -256,7 +261,8 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -296,7 +302,8 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -336,7 +343,8 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -376,7 +384,8 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -416,7 +425,8 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) 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 647be0d204..f8f023ab12 100644 --- a/packages/graphql/tests/tck/aggregations/where/node/localtime.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/node/localtime.test.ts @@ -54,7 +54,8 @@ describe("Cypher Aggregations where node with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -89,7 +90,8 @@ describe("Cypher Aggregations where node with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -124,7 +126,8 @@ describe("Cypher Aggregations where node with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -159,7 +162,8 @@ describe("Cypher Aggregations where node with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -194,7 +198,8 @@ describe("Cypher Aggregations where node with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -229,7 +234,8 @@ describe("Cypher Aggregations where node with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -264,7 +270,8 @@ describe("Cypher Aggregations where node with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -299,7 +306,8 @@ describe("Cypher Aggregations where node with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -334,7 +342,8 @@ describe("Cypher Aggregations where node with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -369,7 +378,8 @@ describe("Cypher Aggregations where node with LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) 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 943e936d23..a4cef0ccea 100644 --- a/packages/graphql/tests/tck/aggregations/where/node/string.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/node/string.test.ts @@ -54,7 +54,8 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -87,7 +88,8 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -120,7 +122,8 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -153,7 +156,8 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -186,7 +190,8 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -219,7 +224,8 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -252,7 +258,8 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -285,7 +292,8 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -318,7 +326,8 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -351,7 +360,8 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -384,7 +394,8 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -414,7 +425,8 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -444,7 +456,8 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -474,7 +487,8 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -504,7 +518,8 @@ describe("Cypher Aggregations where node with String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -567,7 +582,8 @@ describe("Cypher Aggregations where node with String interface relationships of const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1) @@ -601,7 +617,8 @@ describe("Cypher Aggregations where node with String interface relationships of const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1) @@ -635,7 +652,8 @@ describe("Cypher Aggregations where node with String interface relationships of const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1) @@ -669,7 +687,8 @@ describe("Cypher Aggregations where node with String interface relationships of const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1) @@ -703,7 +722,8 @@ describe("Cypher Aggregations where node with String interface relationships of const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1) @@ -737,7 +757,8 @@ describe("Cypher Aggregations where node with String interface relationships of const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1) @@ -771,7 +792,8 @@ describe("Cypher Aggregations where node with String interface relationships of const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1) @@ -805,7 +827,8 @@ describe("Cypher Aggregations where node with String interface relationships of const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1) @@ -839,7 +862,8 @@ describe("Cypher Aggregations where node with String interface relationships of const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1) @@ -873,7 +897,8 @@ describe("Cypher Aggregations where node with String interface relationships of const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1) @@ -907,7 +932,8 @@ describe("Cypher Aggregations where node with String interface relationships of const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1) @@ -938,7 +964,8 @@ describe("Cypher Aggregations where node with String interface relationships of const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1) @@ -969,7 +996,8 @@ describe("Cypher Aggregations where node with String interface relationships of const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1) @@ -1000,7 +1028,8 @@ describe("Cypher Aggregations where node with String interface relationships of const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1) @@ -1031,7 +1060,8 @@ describe("Cypher Aggregations where node with String interface relationships of const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1) 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 8cf26a17c4..04364d1bc8 100644 --- a/packages/graphql/tests/tck/aggregations/where/node/time.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/node/time.test.ts @@ -54,7 +54,8 @@ describe("Cypher Aggregations where node with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -84,7 +85,8 @@ describe("Cypher Aggregations where node with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -114,7 +116,8 @@ describe("Cypher Aggregations where node with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -144,7 +147,8 @@ describe("Cypher Aggregations where node with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -174,7 +178,8 @@ describe("Cypher Aggregations where node with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -204,7 +209,8 @@ describe("Cypher Aggregations where node with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -234,7 +240,8 @@ describe("Cypher Aggregations where node with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -264,7 +271,8 @@ describe("Cypher Aggregations where node with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -294,7 +302,8 @@ describe("Cypher Aggregations where node with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -324,7 +333,8 @@ describe("Cypher Aggregations where node with Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) diff --git a/packages/graphql/tests/tck/alias.test.ts b/packages/graphql/tests/tck/alias.test.ts index 6b937e9cd6..a425c7e015 100644 --- a/packages/graphql/tests/tck/alias.test.ts +++ b/packages/graphql/tests/tck/alias.test.ts @@ -70,7 +70,8 @@ describe("Cypher Alias", () => { // NOTE: Order of these subqueries have been reversed after refactor expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/array-methods.test.ts b/packages/graphql/tests/tck/array-methods.test.ts index ea58e50c3e..01848b623e 100644 --- a/packages/graphql/tests/tck/array-methods.test.ts +++ b/packages/graphql/tests/tck/array-methods.test.ts @@ -48,7 +48,8 @@ describe("Arrays Methods", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH this WHERE apoc.util.validatePredicate(this.ratings IS NULL, \\"Property %s cannot be NULL\\", ['ratings']) SET this.ratings = this.ratings + $this_update_ratings_PUSH @@ -93,7 +94,8 @@ describe("Arrays Methods", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH this WHERE apoc.util.validatePredicate(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 @@ -152,7 +154,8 @@ describe("Arrays Methods", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH this WHERE apoc.util.validatePredicate(this.filmingLocations IS NULL, \\"Property %s cannot be NULL\\", ['filmingLocations']) SET this.filmingLocations = this.filmingLocations + [p in $this_update_filmingLocations_PUSH | point(p)] @@ -209,7 +212,8 @@ describe("Arrays Methods", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH this WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__before_param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(this.ratings IS NULL, \\"Property %s cannot be NULL\\", ['ratings']) SET this.ratings = this.ratings + $this_update_ratings_PUSH @@ -260,7 +264,8 @@ describe("Arrays Methods", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH this WHERE apoc.util.validatePredicate(this.ratings IS NULL, \\"Property %s cannot be NULL\\", ['ratings']) SET this.ratings = this.ratings[0..-$this_update_ratings_POP] @@ -306,7 +311,8 @@ describe("Arrays Methods", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH this WHERE apoc.util.validatePredicate(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] @@ -365,7 +371,8 @@ describe("Arrays Methods", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH this WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__before_param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(this.ratings IS NULL, \\"Property %s cannot be NULL\\", ['ratings']) SET this.ratings = this.ratings[0..-$this_update_ratings_POP] @@ -419,7 +426,8 @@ describe("Arrays Methods", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH this WHERE apoc.util.validatePredicate(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 @@ -486,7 +494,8 @@ describe("Arrays Methods", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WHERE this.id = $param0 WITH this CALL { @@ -589,7 +598,8 @@ describe("Arrays Methods", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WHERE this.id = $param0 WITH this CALL { diff --git a/packages/graphql/tests/tck/arrays.test.ts b/packages/graphql/tests/tck/arrays.test.ts index 460ca42a56..6c156da881 100644 --- a/packages/graphql/tests/tck/arrays.test.ts +++ b/packages/graphql/tests/tck/arrays.test.ts @@ -50,7 +50,8 @@ describe("Cypher Arrays", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE $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 f875cdadb2..fc631596ab 100644 --- a/packages/graphql/tests/tck/connections/alias.test.ts +++ b/packages/graphql/tests/tck/connections/alias.test.ts @@ -60,7 +60,8 @@ describe("Connections Alias", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) @@ -112,7 +113,8 @@ describe("Connections Alias", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this diff --git a/packages/graphql/tests/tck/connections/filtering/composite.test.ts b/packages/graphql/tests/tck/connections/filtering/composite.test.ts index cb88b738a3..7e0e2bc098 100644 --- a/packages/graphql/tests/tck/connections/filtering/composite.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/composite.test.ts @@ -75,7 +75,8 @@ describe("Cypher -> Connections -> Filtering -> Composite", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this @@ -139,7 +140,8 @@ describe("Cypher -> Connections -> Filtering -> Composite", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this @@ -205,7 +207,8 @@ describe("Cypher -> Connections -> Filtering -> Composite", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this @@ -273,7 +276,8 @@ describe("Cypher -> Connections -> Filtering -> Composite", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this @@ -350,7 +354,8 @@ describe("Cypher -> Connections -> Filtering -> Composite", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this diff --git a/packages/graphql/tests/tck/connections/filtering/interface-relationships.test.ts b/packages/graphql/tests/tck/connections/filtering/interface-relationships.test.ts index f7b872e87f..ec739bfda3 100644 --- a/packages/graphql/tests/tck/connections/filtering/interface-relationships.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/interface-relationships.test.ts @@ -90,7 +90,8 @@ describe("interface relationships with aliased fields", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WHERE EXISTS { MATCH (this)-[this0:ACTED_IN]->(this1) WHERE (CASE @@ -140,7 +141,8 @@ describe("interface relationships with aliased fields", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WHERE EXISTS { MATCH (this)-[this0:ACTED_IN]->(this1) WHERE (CASE @@ -180,7 +182,8 @@ describe("interface relationships with aliased fields", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:ProtectedActor) + "CYPHER 5 + MATCH (this:ProtectedActor) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this)-[this1:ACTED_IN]->(this0) WHERE (($jwt.title IS NOT NULL AND CASE WHEN this0:Movie THEN this0.movieTitle 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 5147bc1729..128cba28c7 100644 --- a/packages/graphql/tests/tck/connections/filtering/node/and.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/node/and.test.ts @@ -72,7 +72,8 @@ describe("Cypher -> Connections -> Filtering -> Node -> AND", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) @@ -121,7 +122,8 @@ describe("Cypher -> Connections -> Filtering -> Node -> AND", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) 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 4971bd6e42..4e31d6a561 100644 --- a/packages/graphql/tests/tck/connections/filtering/node/arrays.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/node/arrays.test.ts @@ -69,7 +69,8 @@ describe("Cypher -> Connections -> Filtering -> Node -> Arrays", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) @@ -120,7 +121,8 @@ describe("Cypher -> Connections -> Filtering -> Node -> Arrays", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) 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 301877c15c..0c02b5aae4 100644 --- a/packages/graphql/tests/tck/connections/filtering/node/equality.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/node/equality.test.ts @@ -68,7 +68,8 @@ describe("Cypher -> Connections -> Filtering -> Node -> Equality", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) @@ -115,7 +116,8 @@ describe("Cypher -> Connections -> Filtering -> Node -> Equality", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) 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 61b5cf8669..2fe5beebb7 100644 --- a/packages/graphql/tests/tck/connections/filtering/node/numerical.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/node/numerical.test.ts @@ -70,7 +70,8 @@ describe("Cypher -> Connections -> Filtering -> Node -> Numerical", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) @@ -121,7 +122,8 @@ describe("Cypher -> Connections -> Filtering -> Node -> Numerical", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) @@ -172,7 +174,8 @@ describe("Cypher -> Connections -> Filtering -> Node -> Numerical", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) @@ -223,7 +226,8 @@ describe("Cypher -> Connections -> Filtering -> Node -> Numerical", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) 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 a9851115d3..ffdd522061 100644 --- a/packages/graphql/tests/tck/connections/filtering/node/or.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/node/or.test.ts @@ -72,7 +72,8 @@ describe("Cypher -> Connections -> Filtering -> Node -> OR", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) 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 4b576192b1..c3b2a72d37 100644 --- a/packages/graphql/tests/tck/connections/filtering/node/points.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/node/points.test.ts @@ -86,7 +86,8 @@ describe("Cypher -> Connections -> Filtering -> Node -> Points", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) 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 9571d0cfe7..c9b226a23a 100644 --- a/packages/graphql/tests/tck/connections/filtering/node/relationship.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/node/relationship.test.ts @@ -61,7 +61,8 @@ describe("Cypher -> Connections -> Filtering -> Node -> Relationship", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) 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 d25de1ec40..a4ab27f77f 100644 --- a/packages/graphql/tests/tck/connections/filtering/node/string.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/node/string.test.ts @@ -75,7 +75,8 @@ describe("Cypher -> Connections -> Filtering -> Node -> String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) @@ -122,7 +123,8 @@ describe("Cypher -> Connections -> Filtering -> Node -> String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) @@ -169,7 +171,8 @@ describe("Cypher -> Connections -> Filtering -> Node -> String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) @@ -216,7 +219,8 @@ describe("Cypher -> Connections -> Filtering -> Node -> String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) 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 0b2e9579eb..1e7369a0b3 100644 --- a/packages/graphql/tests/tck/connections/filtering/relationship/and.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/relationship/and.test.ts @@ -72,7 +72,8 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> AND", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) @@ -124,7 +125,8 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> AND", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) 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 d20cada675..3836d7b1e3 100644 --- a/packages/graphql/tests/tck/connections/filtering/relationship/arrays.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/relationship/arrays.test.ts @@ -69,7 +69,8 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Arrays", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) @@ -125,7 +126,8 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Arrays", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) 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 8fb23e45ed..498e205ee4 100644 --- a/packages/graphql/tests/tck/connections/filtering/relationship/equality.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/relationship/equality.test.ts @@ -68,7 +68,8 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Equality", () => const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) @@ -118,7 +119,8 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Equality", () => const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) 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 02234fdc65..7bd8d0ac49 100644 --- a/packages/graphql/tests/tck/connections/filtering/relationship/numerical.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/relationship/numerical.test.ts @@ -68,7 +68,8 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Numerical", () = const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) @@ -118,7 +119,8 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Numerical", () = const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) @@ -168,7 +170,8 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Numerical", () = const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) @@ -218,7 +221,8 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Numerical", () = const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) 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 e06e6754bd..847c897c68 100644 --- a/packages/graphql/tests/tck/connections/filtering/relationship/or.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/relationship/or.test.ts @@ -72,7 +72,8 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> OR", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) @@ -119,7 +120,8 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> OR", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE EXISTS { MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) WHERE (this1.name = $param0 OR this0.role = $param1) 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 78deb4c154..211930e4e8 100644 --- a/packages/graphql/tests/tck/connections/filtering/relationship/points.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/relationship/points.test.ts @@ -84,7 +84,8 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Points", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) 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 e11e650789..95492e1721 100644 --- a/packages/graphql/tests/tck/connections/filtering/relationship/string.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/relationship/string.test.ts @@ -76,7 +76,8 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) @@ -123,7 +124,8 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) @@ -170,7 +172,8 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) @@ -217,7 +220,8 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> String", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) 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 bf1011d6e6..8a195874e2 100644 --- a/packages/graphql/tests/tck/connections/filtering/relationship/temporal.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/relationship/temporal.test.ts @@ -74,7 +74,8 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Temporal", () => const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) diff --git a/packages/graphql/tests/tck/connections/interfaces.test.ts b/packages/graphql/tests/tck/connections/interfaces.test.ts index a4e284a453..077dbe8da9 100644 --- a/packages/graphql/tests/tck/connections/interfaces.test.ts +++ b/packages/graphql/tests/tck/connections/interfaces.test.ts @@ -83,7 +83,8 @@ describe("Cypher -> Connections -> Interfaces", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this CALL { @@ -135,7 +136,8 @@ describe("Cypher -> Connections -> Interfaces", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this CALL { @@ -194,7 +196,8 @@ describe("Cypher -> Connections -> Interfaces", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this CALL { @@ -261,7 +264,8 @@ describe("Cypher -> Connections -> Interfaces", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this CALL { @@ -320,7 +324,8 @@ describe("Cypher -> Connections -> Interfaces", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this CALL { @@ -378,7 +383,8 @@ describe("Cypher -> Connections -> Interfaces", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this CALL { @@ -436,7 +442,8 @@ describe("Cypher -> Connections -> Interfaces", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/connections/mixed-nesting.test.ts b/packages/graphql/tests/tck/connections/mixed-nesting.test.ts index 1326d6fa2e..ce6778c476 100644 --- a/packages/graphql/tests/tck/connections/mixed-nesting.test.ts +++ b/packages/graphql/tests/tck/connections/mixed-nesting.test.ts @@ -71,7 +71,8 @@ describe("Mixed nesting", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this @@ -139,7 +140,8 @@ describe("Mixed nesting", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this @@ -215,7 +217,8 @@ describe("Mixed nesting", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this diff --git a/packages/graphql/tests/tck/connections/projections/create.test.ts b/packages/graphql/tests/tck/connections/projections/create.test.ts index 0c974b93e1..48964693a0 100644 --- a/packages/graphql/tests/tck/connections/projections/create.test.ts +++ b/packages/graphql/tests/tck/connections/projections/create.test.ts @@ -70,7 +70,8 @@ describe("Cypher -> Connections -> Projections -> Create", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) @@ -129,7 +130,8 @@ describe("Cypher -> Connections -> Projections -> Create", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) @@ -191,7 +193,8 @@ describe("Cypher -> Connections -> Projections -> Create", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) diff --git a/packages/graphql/tests/tck/connections/projections/projections.test.ts b/packages/graphql/tests/tck/connections/projections/projections.test.ts index ccf23bdb94..f4c2b767f7 100644 --- a/packages/graphql/tests/tck/connections/projections/projections.test.ts +++ b/packages/graphql/tests/tck/connections/projections/projections.test.ts @@ -64,7 +64,8 @@ describe("Relay Cursor Connection projections", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this @@ -109,7 +110,8 @@ describe("Relay Cursor Connection projections", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this @@ -149,7 +151,8 @@ describe("Relay Cursor Connection projections", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this @@ -195,7 +198,8 @@ describe("Relay Cursor Connection projections", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WHERE this.name = $param0 CALL { WITH this @@ -244,7 +248,8 @@ describe("Relay Cursor Connection projections", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WHERE this.name = $param0 CALL { WITH this @@ -293,7 +298,8 @@ describe("Relay Cursor Connection projections", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this @@ -338,7 +344,8 @@ describe("Relay Cursor Connection projections", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this diff --git a/packages/graphql/tests/tck/connections/projections/update.test.ts b/packages/graphql/tests/tck/connections/projections/update.test.ts index 55e69550fe..1ddea1d4a1 100644 --- a/packages/graphql/tests/tck/connections/projections/update.test.ts +++ b/packages/graphql/tests/tck/connections/projections/update.test.ts @@ -70,7 +70,8 @@ describe("Cypher -> Connections -> Projections -> Update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 WITH * CALL { diff --git a/packages/graphql/tests/tck/connections/relationship-properties.test.ts b/packages/graphql/tests/tck/connections/relationship-properties.test.ts index 91a71740a2..b59444722b 100644 --- a/packages/graphql/tests/tck/connections/relationship-properties.test.ts +++ b/packages/graphql/tests/tck/connections/relationship-properties.test.ts @@ -69,7 +69,8 @@ describe("Relationship Properties Cypher", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this @@ -116,7 +117,8 @@ describe("Relationship Properties Cypher", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this @@ -165,7 +167,8 @@ describe("Relationship Properties Cypher", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this @@ -213,7 +216,8 @@ describe("Relationship Properties Cypher", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) @@ -255,7 +259,8 @@ describe("Relationship Properties Cypher", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) @@ -309,7 +314,8 @@ describe("Relationship Properties Cypher", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this @@ -389,7 +395,8 @@ describe("Relationship Properties Cypher", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this 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 5e0b58c752..59edbcd45f 100644 --- a/packages/graphql/tests/tck/connections/relationship_properties/connect.test.ts +++ b/packages/graphql/tests/tck/connections/relationship_properties/connect.test.ts @@ -70,7 +70,8 @@ describe("Relationship Properties Connect Cypher", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:Movie) SET this0.title = $this0_title WITH * @@ -158,7 +159,8 @@ describe("Relationship Properties Connect Cypher", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:Movie) SET this0.title = $this0_title WITH * @@ -242,7 +244,8 @@ describe("Relationship Properties Connect Cypher", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 WITH * CALL { @@ -322,7 +325,8 @@ describe("Relationship Properties Connect Cypher", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 WITH * CALL { 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 c9b33370d7..a20364e245 100644 --- a/packages/graphql/tests/tck/connections/relationship_properties/create.test.ts +++ b/packages/graphql/tests/tck/connections/relationship_properties/create.test.ts @@ -77,7 +77,8 @@ describe("Relationship Properties Create Cypher", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) 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 3e968ad62a..c4a6e4dc9f 100644 --- a/packages/graphql/tests/tck/connections/relationship_properties/update.test.ts +++ b/packages/graphql/tests/tck/connections/relationship_properties/update.test.ts @@ -67,7 +67,8 @@ describe("Cypher -> Connections -> Relationship Properties -> Update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 WITH this CALL { @@ -138,7 +139,8 @@ describe("Cypher -> Connections -> Relationship Properties -> Update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 WITH this CALL { diff --git a/packages/graphql/tests/tck/connections/sort.test.ts b/packages/graphql/tests/tck/connections/sort.test.ts index 7c24a37a5f..0258b4d91a 100644 --- a/packages/graphql/tests/tck/connections/sort.test.ts +++ b/packages/graphql/tests/tck/connections/sort.test.ts @@ -75,7 +75,8 @@ describe("Relationship Properties Cypher", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:Movie) + "CYPHER 5 + MATCH (this0:Movie) WITH collect({ node: this0 }) AS edges WITH edges, size(edges) AS totalCount CALL { @@ -136,7 +137,8 @@ describe("Relationship Properties Cypher", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:Movie) + "CYPHER 5 + MATCH (this0:Movie) WITH collect({ node: this0 }) AS edges WITH edges, size(edges) AS totalCount CALL { diff --git a/packages/graphql/tests/tck/connections/top-level-interfaces.test.ts b/packages/graphql/tests/tck/connections/top-level-interfaces.test.ts index d7df8b0854..7164190fd5 100644 --- a/packages/graphql/tests/tck/connections/top-level-interfaces.test.ts +++ b/packages/graphql/tests/tck/connections/top-level-interfaces.test.ts @@ -78,7 +78,8 @@ describe("Top level interface connections", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this0:Movie) WHERE this0.title = $param0 WITH { node: { __resolveType: \\"Movie\\", __id: id(this0), cost: this0.cost, title: this0.title } } AS edge @@ -120,7 +121,8 @@ describe("Top level interface connections", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this0:Movie) WHERE this0.title = $param0 WITH { node: { __resolveType: \\"Movie\\", __id: id(this0), cost: this0.cost, title: this0.title } } AS edge diff --git a/packages/graphql/tests/tck/connections/unions.test.ts b/packages/graphql/tests/tck/connections/unions.test.ts index df311957e4..99ec33cc35 100644 --- a/packages/graphql/tests/tck/connections/unions.test.ts +++ b/packages/graphql/tests/tck/connections/unions.test.ts @@ -80,7 +80,8 @@ describe("Cypher -> Connections -> Unions", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Author) + "CYPHER 5 + MATCH (this:Author) CALL { WITH this CALL { @@ -136,7 +137,8 @@ describe("Cypher -> Connections -> Unions", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Author) + "CYPHER 5 + MATCH (this:Author) CALL { WITH this CALL { @@ -196,7 +198,8 @@ describe("Cypher -> Connections -> Unions", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Author) + "CYPHER 5 + MATCH (this:Author) CALL { WITH this CALL { @@ -265,7 +268,8 @@ describe("Cypher -> Connections -> Unions", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Author) + "CYPHER 5 + MATCH (this:Author) CALL { WITH this CALL { @@ -331,7 +335,8 @@ describe("Cypher -> Connections -> Unions", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Author) + "CYPHER 5 + MATCH (this:Author) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/deprecated/cypher-sort-deprecated.test.ts b/packages/graphql/tests/tck/deprecated/cypher-sort-deprecated.test.ts index 9ee8cc21d8..42fe975db8 100644 --- a/packages/graphql/tests/tck/deprecated/cypher-sort-deprecated.test.ts +++ b/packages/graphql/tests/tck/deprecated/cypher-sort-deprecated.test.ts @@ -107,7 +107,8 @@ describe("Cypher sort deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH * ORDER BY this.id DESC RETURN this { .id, .title } AS this" @@ -129,7 +130,8 @@ describe("Cypher sort deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH * ORDER BY this.id DESC RETURN this { .title, .id, aliased: this.id } AS this" @@ -150,7 +152,8 @@ describe("Cypher sort deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH * ORDER BY this.id DESC RETURN this { .title, .id } AS this" @@ -172,7 +175,8 @@ describe("Cypher sort deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -204,7 +208,8 @@ describe("Cypher sort deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -234,7 +239,8 @@ describe("Cypher sort deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -267,7 +273,8 @@ describe("Cypher sort deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH * ORDER BY this.id DESC, this.title ASC RETURN this { .id, .title } AS this" @@ -296,7 +303,8 @@ describe("Cypher sort deprecated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 WITH * ORDER BY this.id DESC, this.title ASC @@ -334,7 +342,8 @@ describe("Cypher sort deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[this0:HAS_GENRE]->(this1:Genre) @@ -363,7 +372,8 @@ describe("Cypher sort deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[this0:HAS_GENRE]->(this1:Genre) @@ -393,7 +403,8 @@ describe("Cypher sort deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[this0:HAS_GENRE]->(this1:Genre) @@ -448,7 +459,8 @@ describe("Cypher sort deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:Movie) + "CYPHER 5 + MATCH (this0:Movie) WITH collect({ node: this0 }) AS edges WITH edges, size(edges) AS totalCount CALL { @@ -538,7 +550,8 @@ describe("Cypher sort deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this MATCH (this)-[this0:ACTED_IN]->(this1:Movie) diff --git a/packages/graphql/tests/tck/deprecated/generic-filtering/advanced-filtering-deprecated.test.ts b/packages/graphql/tests/tck/deprecated/generic-filtering/advanced-filtering-deprecated.test.ts index 2b760ecfe6..48a00c2b5b 100644 --- a/packages/graphql/tests/tck/deprecated/generic-filtering/advanced-filtering-deprecated.test.ts +++ b/packages/graphql/tests/tck/deprecated/generic-filtering/advanced-filtering-deprecated.test.ts @@ -72,7 +72,8 @@ describe("Cypher Advanced Filtering - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 RETURN this { .title } AS this" `); @@ -96,7 +97,8 @@ describe("Cypher Advanced Filtering - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this._id IN $param0 RETURN this { ._id } AS this" `); @@ -122,7 +124,8 @@ describe("Cypher Advanced Filtering - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.id =~ $param0 RETURN this { .id } AS this" `); @@ -146,7 +149,8 @@ describe("Cypher Advanced Filtering - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE NOT (this.id = $param0) RETURN this { .id } AS this" `); @@ -170,7 +174,8 @@ describe("Cypher Advanced Filtering - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.id CONTAINS $param0 RETURN this { .id } AS this" `); @@ -194,7 +199,8 @@ describe("Cypher Advanced Filtering - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.id STARTS WITH $param0 RETURN this { .id } AS this" `); @@ -218,7 +224,8 @@ describe("Cypher Advanced Filtering - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.id ENDS WITH $param0 RETURN this { .id } AS this" `); @@ -242,7 +249,8 @@ describe("Cypher Advanced Filtering - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.actorCount < $param0 RETURN this { .actorCount } AS this" `); @@ -269,7 +277,8 @@ describe("Cypher Advanced Filtering - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.budget < $param0 RETURN this { .budget } AS this" `); @@ -295,7 +304,8 @@ describe("Cypher Advanced Filtering - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title < $param0 RETURN this { .title } AS this" `); @@ -319,7 +329,8 @@ describe("Cypher Advanced Filtering - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.actorCount <= $param0 RETURN this { .actorCount } AS this" `); @@ -346,7 +357,8 @@ describe("Cypher Advanced Filtering - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.budget <= $param0 RETURN this { .budget } AS this" `); @@ -372,7 +384,8 @@ describe("Cypher Advanced Filtering - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title <= $param0 RETURN this { .title } AS this" `); @@ -396,7 +409,8 @@ describe("Cypher Advanced Filtering - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.actorCount > $param0 RETURN this { .actorCount } AS this" `); @@ -423,7 +437,8 @@ describe("Cypher Advanced Filtering - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.budget > $param0 RETURN this { .budget } AS this" `); @@ -449,7 +464,8 @@ describe("Cypher Advanced Filtering - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title > $param0 RETURN this { .title } AS this" `); @@ -473,7 +489,8 @@ describe("Cypher Advanced Filtering - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.actorCount >= $param0 RETURN this { .actorCount } AS this" `); @@ -500,7 +517,8 @@ describe("Cypher Advanced Filtering - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.budget >= $param0 RETURN this { .budget } AS this" `); @@ -526,7 +544,8 @@ describe("Cypher Advanced Filtering - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title >= $param0 RETURN this { .title } AS this" `); @@ -551,7 +570,8 @@ describe("Cypher Advanced Filtering - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE EXISTS { MATCH (this)-[:IN_GENRE]->(this0:Genre) WHERE this0.name = $param0 @@ -578,7 +598,8 @@ describe("Cypher Advanced Filtering - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE NOT (EXISTS { MATCH (this)-[:IN_GENRE]->(this0:Genre) WHERE this0.name = $param0 @@ -610,7 +631,8 @@ describe("Cypher Advanced Filtering - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE (EXISTS { MATCH (this)-[:IN_GENRE]->(this0:Genre) WHERE this0.name = $param0 @@ -632,7 +654,8 @@ describe("Cypher Advanced Filtering - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE NOT (EXISTS { MATCH (this)-[:IN_GENRE]->(this0:Genre) WHERE this0.name = $param0 @@ -651,7 +674,8 @@ describe("Cypher Advanced Filtering - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE single(this0 IN [(this)-[:IN_GENRE]->(this0:Genre) WHERE this0.name = $param0 | 1] WHERE true) RETURN this { .actorCount } AS this" `); @@ -667,7 +691,8 @@ describe("Cypher Advanced Filtering - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE EXISTS { MATCH (this)-[:IN_GENRE]->(this0:Genre) WHERE this0.name = $param0 @@ -696,7 +721,8 @@ describe("Cypher Advanced Filtering - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE EXISTS { MATCH (this)-[this0:IN_GENRE]->(this1:Genre) WHERE this1.name = $param0 @@ -723,7 +749,8 @@ describe("Cypher Advanced Filtering - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE NOT (EXISTS { MATCH (this)-[this0:IN_GENRE]->(this1:Genre) WHERE this1.name = $param0 @@ -755,7 +782,8 @@ describe("Cypher Advanced Filtering - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE (EXISTS { MATCH (this)-[this0:IN_GENRE]->(this1:Genre) WHERE this1.name = $param0 @@ -777,7 +805,8 @@ describe("Cypher Advanced Filtering - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE NOT (EXISTS { MATCH (this)-[this0:IN_GENRE]->(this1:Genre) WHERE this1.name = $param0 @@ -796,7 +825,8 @@ describe("Cypher Advanced Filtering - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + 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" `); @@ -812,7 +842,8 @@ describe("Cypher Advanced Filtering - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE EXISTS { MATCH (this)-[this0:IN_GENRE]->(this1:Genre) WHERE this1.name = $param0 diff --git a/packages/graphql/tests/tck/deprecated/generic-filtering/cypher-filtering-list-deprecated.test.ts b/packages/graphql/tests/tck/deprecated/generic-filtering/cypher-filtering-list-deprecated.test.ts index 101276eb74..a27a6e3b1b 100644 --- a/packages/graphql/tests/tck/deprecated/generic-filtering/cypher-filtering-list-deprecated.test.ts +++ b/packages/graphql/tests/tck/deprecated/generic-filtering/cypher-filtering-list-deprecated.test.ts @@ -50,7 +50,8 @@ describe("cypher directive filtering - Lists - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/deprecated/generic-filtering/cypher-filtering-one-to-one-relationship-deprecated.test.ts b/packages/graphql/tests/tck/deprecated/generic-filtering/cypher-filtering-one-to-one-relationship-deprecated.test.ts index 9e32a87e1c..b392527680 100644 --- a/packages/graphql/tests/tck/deprecated/generic-filtering/cypher-filtering-one-to-one-relationship-deprecated.test.ts +++ b/packages/graphql/tests/tck/deprecated/generic-filtering/cypher-filtering-one-to-one-relationship-deprecated.test.ts @@ -65,7 +65,8 @@ describe("cypher directive filtering - One To One Relationship - deprecated", () const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -133,7 +134,8 @@ describe("cypher directive filtering - One To One Relationship - deprecated", () const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -210,7 +212,8 @@ describe("cypher directive filtering - One To One Relationship - deprecated", () const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -289,7 +292,8 @@ describe("cypher directive filtering - One To One Relationship - deprecated", () const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -359,7 +363,8 @@ describe("cypher directive filtering - One To One Relationship - deprecated", () const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -445,7 +450,8 @@ describe("cypher directive filtering - One To One Relationship - deprecated", () const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Person) + "CYPHER 5 + MATCH (this:Person) CALL { WITH this CALL { @@ -568,7 +574,8 @@ describe("cypher directive filtering - One To One Relationship - deprecated", () const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Person) + "CYPHER 5 + MATCH (this:Person) CALL { WITH this CALL { @@ -690,7 +697,8 @@ describe("cypher directive filtering - One To One Relationship - deprecated", () const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Person) + "CYPHER 5 + MATCH (this:Person) CALL { WITH this CALL { @@ -812,7 +820,8 @@ describe("cypher directive filtering - One To One Relationship - deprecated", () const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Person) + "CYPHER 5 + MATCH (this:Person) CALL { WITH this CALL { @@ -935,7 +944,8 @@ describe("cypher directive filtering - One To One Relationship - deprecated", () const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Person) + "CYPHER 5 + MATCH (this:Person) CALL { WITH this CALL { @@ -1058,7 +1068,8 @@ describe("cypher directive filtering - One To One Relationship - deprecated", () const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Person) + "CYPHER 5 + MATCH (this:Person) CALL { WITH this CALL { @@ -1180,7 +1191,8 @@ describe("cypher directive filtering - One To One Relationship - deprecated", () const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Person) + "CYPHER 5 + MATCH (this:Person) CALL { WITH this CALL { @@ -1302,7 +1314,8 @@ describe("cypher directive filtering - One To One Relationship - deprecated", () const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Person) + "CYPHER 5 + MATCH (this:Person) CALL { WITH this CALL { @@ -1427,7 +1440,8 @@ describe("cypher directive filtering - One To One Relationship - deprecated", () const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Person) + "CYPHER 5 + MATCH (this:Person) CALL { WITH this CALL { @@ -1553,7 +1567,8 @@ describe("cypher directive filtering - One To One Relationship - deprecated", () const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/deprecated/generic-filtering/cypher-filtering-scalar-deprecated.test.ts b/packages/graphql/tests/tck/deprecated/generic-filtering/cypher-filtering-scalar-deprecated.test.ts index 4eb379b1ba..cdcd392e44 100644 --- a/packages/graphql/tests/tck/deprecated/generic-filtering/cypher-filtering-scalar-deprecated.test.ts +++ b/packages/graphql/tests/tck/deprecated/generic-filtering/cypher-filtering-scalar-deprecated.test.ts @@ -51,7 +51,8 @@ describe("cypher directive filtering - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -120,7 +121,8 @@ describe("cypher directive filtering - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -189,7 +191,8 @@ describe("cypher directive filtering - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/deprecated/generic-filtering/delete-deprecated.test.ts b/packages/graphql/tests/tck/deprecated/generic-filtering/delete-deprecated.test.ts index 16d87dc5ca..8f5e37027a 100644 --- a/packages/graphql/tests/tck/deprecated/generic-filtering/delete-deprecated.test.ts +++ b/packages/graphql/tests/tck/deprecated/generic-filtering/delete-deprecated.test.ts @@ -55,7 +55,8 @@ describe("Cypher Delete - Deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.id = $param0 DETACH DELETE this" `); @@ -82,7 +83,8 @@ describe("Cypher Delete - Deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.id = $param0 WITH * CALL { @@ -128,7 +130,8 @@ describe("Cypher Delete - Deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.id = $param0 WITH * CALL { @@ -186,7 +189,8 @@ describe("Cypher Delete - Deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.id = $param0 WITH * CALL { @@ -250,7 +254,8 @@ describe("Cypher Delete - Deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.id = $param0 WITH * CALL { diff --git a/packages/graphql/tests/tck/deprecated/generic-filtering/delete-interface-deprecated.test.ts b/packages/graphql/tests/tck/deprecated/generic-filtering/delete-interface-deprecated.test.ts index ddb73dc3f0..b2e01e71af 100644 --- a/packages/graphql/tests/tck/deprecated/generic-filtering/delete-interface-deprecated.test.ts +++ b/packages/graphql/tests/tck/deprecated/generic-filtering/delete-interface-deprecated.test.ts @@ -89,7 +89,8 @@ describe("Cypher Delete - interface - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WHERE this.name = $param0 DETACH DELETE this" `); @@ -116,7 +117,8 @@ describe("Cypher Delete - interface - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WHERE this.name = $param0 WITH * CALL { @@ -169,7 +171,8 @@ describe("Cypher Delete - interface - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WHERE this.name = $param0 WITH * CALL { @@ -224,7 +227,8 @@ describe("Cypher Delete - interface - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WHERE this.name = $param0 WITH * CALL { @@ -284,7 +288,8 @@ describe("Cypher Delete - interface - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WHERE this.name = $param0 WITH * CALL { diff --git a/packages/graphql/tests/tck/deprecated/generic-filtering/node-label-interface-deprecated.test.ts b/packages/graphql/tests/tck/deprecated/generic-filtering/node-label-interface-deprecated.test.ts index 47feeea58e..d1a4729f40 100644 --- a/packages/graphql/tests/tck/deprecated/generic-filtering/node-label-interface-deprecated.test.ts +++ b/packages/graphql/tests/tck/deprecated/generic-filtering/node-label-interface-deprecated.test.ts @@ -65,7 +65,8 @@ describe("Node directive with interface - deprecated", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Film) + "CYPHER 5 + MATCH (this:Film) WHERE this.title = $param0 CALL { WITH this diff --git a/packages/graphql/tests/tck/deprecated/generic-filtering/projection-deprecated.test.ts b/packages/graphql/tests/tck/deprecated/generic-filtering/projection-deprecated.test.ts index ea59d35126..6b196034c8 100644 --- a/packages/graphql/tests/tck/deprecated/generic-filtering/projection-deprecated.test.ts +++ b/packages/graphql/tests/tck/deprecated/generic-filtering/projection-deprecated.test.ts @@ -65,7 +65,8 @@ describe("Cypher Auth Projection - deprecated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH this WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) SET this.id = $this_update_id_SET @@ -106,7 +107,8 @@ describe("Cypher Auth Projection - deprecated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:User) diff --git a/packages/graphql/tests/tck/deprecated/generic-filtering/roles-deprecated.test.ts b/packages/graphql/tests/tck/deprecated/generic-filtering/roles-deprecated.test.ts index 441fd89ab5..f778e3bacf 100644 --- a/packages/graphql/tests/tck/deprecated/generic-filtering/roles-deprecated.test.ts +++ b/packages/graphql/tests/tck/deprecated/generic-filtering/roles-deprecated.test.ts @@ -111,7 +111,8 @@ describe("Cypher Auth Roles - deprecated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN this { .id, .name } AS this" @@ -148,7 +149,8 @@ describe("Cypher Auth Roles - deprecated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param3 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN this { .id, .name, .password } AS this" @@ -186,7 +188,8 @@ describe("Cypher Auth Roles - deprecated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param3 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) CALL { @@ -238,7 +241,8 @@ describe("Cypher Auth Roles - deprecated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:User) @@ -288,7 +292,8 @@ describe("Cypher Auth Roles - deprecated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:User) @@ -340,7 +345,8 @@ describe("Cypher Auth Roles - deprecated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE (this.id = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param3 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) SET this.id = $this_update_id_SET @@ -387,7 +393,8 @@ describe("Cypher Auth Roles - deprecated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE (this.id = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param3 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH this @@ -437,7 +444,8 @@ describe("Cypher Auth Roles - deprecated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH * @@ -508,7 +516,8 @@ describe("Cypher Auth Roles - deprecated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Comment) + "CYPHER 5 + MATCH (this:Comment) WITH this CALL { WITH this @@ -574,7 +583,8 @@ describe("Cypher Auth Roles - deprecated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this @@ -642,7 +652,8 @@ describe("Cypher Auth Roles - deprecated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Comment) + "CYPHER 5 + MATCH (this:Comment) WITH this CALL { WITH this @@ -728,7 +739,8 @@ describe("Cypher Auth Roles - deprecated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) DETACH DELETE this" `); @@ -762,7 +774,8 @@ describe("Cypher Auth Roles - deprecated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH * CALL { diff --git a/packages/graphql/tests/tck/directives/alias.test.ts b/packages/graphql/tests/tck/directives/alias.test.ts index d77517ee93..2c57d9bb6c 100644 --- a/packages/graphql/tests/tck/directives/alias.test.ts +++ b/packages/graphql/tests/tck/directives/alias.test.ts @@ -65,7 +65,8 @@ describe("Cypher alias directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this MATCH (this)-[this0:ACTED_IN]->(this1:Movie) @@ -104,7 +105,8 @@ describe("Cypher alias directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this MATCH (this)-[this0:ACTED_IN]->(this1:Movie) @@ -168,7 +170,8 @@ describe("Cypher alias directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Actor) 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 264f4289b4..8b9fb5c573 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 @@ -120,7 +120,8 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN this { .id } AS this" @@ -154,7 +155,8 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN this { .password } AS this" @@ -191,7 +193,8 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { @@ -239,7 +242,8 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { MATCH (this)<-[:HAS_POST]-(this0:User) @@ -290,7 +294,8 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE (this.id = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) CALL { @@ -353,7 +358,8 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE (this.id = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) SET this.id = $this_update_id_SET @@ -395,7 +401,8 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE (this.id = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH this @@ -442,7 +449,8 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) WITH * WHERE (this.id = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { MATCH (this)<-[:HAS_POST]-(this0:User) @@ -500,7 +508,8 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) WITH * WHERE (this.id = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { MATCH (this)<-[:HAS_POST]-(this0:User) @@ -555,7 +564,8 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE (this.id = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) DETACH DELETE this" `); @@ -592,7 +602,8 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE (this.id = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH * CALL { @@ -648,7 +659,8 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE (this.id = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH this @@ -733,7 +745,8 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Comment) + "CYPHER 5 + MATCH (this:Comment) WITH * WHERE (this.id = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { MATCH (this)<-[:HAS_COMMENT]-(this0:User) @@ -844,7 +857,8 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE (this.id = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH * 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 26b376be31..d48dd64be2 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 @@ -94,7 +94,8 @@ describe("@auth allow on specific interface implementation", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) CALL { WITH this CALL { @@ -153,7 +154,8 @@ describe("@auth allow on specific interface implementation", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE this.id = $param0 CALL { WITH this @@ -227,7 +229,8 @@ describe("@auth allow on specific interface implementation", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE this.id = $param0 WITH this CALL { @@ -314,7 +317,8 @@ describe("@auth allow on specific interface implementation", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE this.id = $param0 WITH * CALL { 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 ee70396ab3..4aee939bbb 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 @@ -78,7 +78,8 @@ describe("Cypher Auth isAuthenticated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Post) @@ -119,7 +120,8 @@ describe("Cypher Auth isAuthenticated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Comment) @@ -160,7 +162,8 @@ describe("Cypher Auth isAuthenticated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) WHERE this.id = $param0 SET this.id = $this_update_id_SET RETURN collect(DISTINCT this { .id }) AS data" @@ -192,7 +195,8 @@ describe("Cypher Auth isAuthenticated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Comment) + "CYPHER 5 + MATCH (this:Comment) WHERE this.id = $param0 SET this.id = $this_update_id_SET RETURN collect(DISTINCT this { .id }) AS data" @@ -222,7 +226,8 @@ describe("Cypher Auth isAuthenticated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) DETACH DELETE this" `); @@ -244,7 +249,8 @@ describe("Cypher Auth isAuthenticated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Comment) + "CYPHER 5 + MATCH (this:Comment) DETACH DELETE this" `); @@ -266,7 +272,8 @@ describe("Cypher Auth isAuthenticated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * CALL { WITH * 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 f259c41405..01f5d5e243 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 @@ -81,7 +81,8 @@ describe("Cypher Auth isAuthenticated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) RETURN this { .id, .name } AS this" `); @@ -105,7 +106,8 @@ describe("Cypher Auth isAuthenticated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) RETURN this { .id, .name, .password } AS this" `); @@ -129,7 +131,8 @@ describe("Cypher Auth isAuthenticated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) CALL { WITH this CALL { @@ -164,7 +167,8 @@ describe("Cypher Auth isAuthenticated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:User) @@ -203,7 +207,8 @@ describe("Cypher Auth isAuthenticated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:User) @@ -244,7 +249,8 @@ describe("Cypher Auth isAuthenticated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE this.id = $param0 SET this.id = $this_update_id_SET RETURN collect(DISTINCT this { .id }) AS data" @@ -276,7 +282,8 @@ describe("Cypher Auth isAuthenticated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE this.id = $param0 SET this.password = $this_update_password_SET RETURN collect(DISTINCT this { .id }) AS data" @@ -306,7 +313,8 @@ describe("Cypher Auth isAuthenticated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) DETACH DELETE this" `); @@ -328,7 +336,8 @@ describe("Cypher Auth isAuthenticated", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * CALL { WITH * 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 bfb580596b..445ae45df9 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 @@ -104,7 +104,8 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN this { .id } AS this" @@ -140,7 +141,8 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE (this.name = $param0 AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $param3 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param4 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN this { .id } AS this" @@ -180,7 +182,8 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { @@ -237,7 +240,8 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { @@ -299,7 +303,8 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { @@ -358,7 +363,8 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { @@ -414,7 +420,8 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { @@ -476,7 +483,8 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { @@ -539,7 +547,8 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { @@ -596,7 +605,8 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) SET this.name = $this_update_name_SET @@ -645,7 +655,8 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE (this.name = $param0 AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $param3 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param4 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) SET this.name = $this_update_name_SET @@ -698,7 +709,8 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this @@ -776,7 +788,8 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) DETACH DELETE this" `); @@ -811,7 +824,8 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH * CALL { @@ -870,7 +884,8 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:User) SET this0.id = $this0_id SET this0.name = $this0_name @@ -961,7 +976,8 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:User) SET this0.id = $this0_id SET this0.name = $this0_name @@ -1044,7 +1060,8 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH * @@ -1123,7 +1140,8 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH * @@ -1203,7 +1221,8 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this @@ -1277,7 +1296,8 @@ describe("Cypher Auth Where with Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this 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 912fbaf372..ffb0e0db47 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 @@ -114,7 +114,8 @@ describe("Cypher Auth Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN this { .id, .name } AS this" @@ -151,7 +152,8 @@ describe("Cypher Auth Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param3 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN this { .id, .name, .password } AS this" @@ -189,7 +191,8 @@ describe("Cypher Auth Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param3 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) CALL { @@ -241,7 +244,8 @@ describe("Cypher Auth Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:User) @@ -291,7 +295,8 @@ describe("Cypher Auth Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:User) @@ -343,7 +348,8 @@ describe("Cypher Auth Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE (this.id = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param3 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) SET this.id = $this_update_id_SET @@ -390,7 +396,8 @@ describe("Cypher Auth Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE (this.id = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param3 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH this @@ -440,7 +447,8 @@ describe("Cypher Auth Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH * @@ -513,7 +521,8 @@ describe("Cypher Auth Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Comment) + "CYPHER 5 + MATCH (this:Comment) WITH this CALL { WITH this @@ -579,7 +588,8 @@ describe("Cypher Auth Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this @@ -649,7 +659,8 @@ describe("Cypher Auth Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Comment) + "CYPHER 5 + MATCH (this:Comment) WITH this CALL { WITH this @@ -737,7 +748,8 @@ describe("Cypher Auth Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) DETACH DELETE this" `); @@ -771,7 +783,8 @@ describe("Cypher Auth Roles", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH * CALL { diff --git a/packages/graphql/tests/tck/directives/authorization/arguments/validate/interface-relationships/implementation-bind.test.ts b/packages/graphql/tests/tck/directives/authorization/arguments/validate/interface-relationships/implementation-bind.test.ts index e84c212fef..3d3cca2943 100644 --- a/packages/graphql/tests/tck/directives/authorization/arguments/validate/interface-relationships/implementation-bind.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/arguments/validate/interface-relationships/implementation-bind.test.ts @@ -117,7 +117,8 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:User) SET this0.id = $this0_id SET this0.name = $this0_name @@ -197,7 +198,8 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:User) SET this0.id = $this0_id SET this0.name = $this0_name @@ -263,7 +265,8 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE this.id = $param0 WITH this CALL { diff --git a/packages/graphql/tests/tck/directives/authorization/arguments/validate/validate.test.ts b/packages/graphql/tests/tck/directives/authorization/arguments/validate/validate.test.ts index 7f2e035a57..a4163e40a3 100644 --- a/packages/graphql/tests/tck/directives/authorization/arguments/validate/validate.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/arguments/validate/validate.test.ts @@ -87,7 +87,8 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:User) @@ -149,7 +150,8 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:User) @@ -244,7 +246,8 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE this.id = $param0 SET this.id = $this_update_id_SET WITH this @@ -293,7 +296,8 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE this.id = $param0 WITH this CALL { @@ -383,7 +387,8 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) WHERE this.id = $param0 WITH * CALL { @@ -447,7 +452,8 @@ describe("Cypher Auth Allow", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) WHERE this.id = $param0 WITH this CALL { diff --git a/packages/graphql/tests/tck/directives/authorization/arguments/where/connection-auth-filter.test.ts b/packages/graphql/tests/tck/directives/authorization/arguments/where/connection-auth-filter.test.ts index a6c989fafa..fa6598ca21 100644 --- a/packages/graphql/tests/tck/directives/authorization/arguments/where/connection-auth-filter.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/arguments/where/connection-auth-filter.test.ts @@ -95,7 +95,8 @@ describe("Connection auth filter", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:User) + "CYPHER 5 + MATCH (this0:User) WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub)) WITH collect({ node: this0 }) AS edges WITH edges, size(edges) AS totalCount @@ -140,7 +141,8 @@ describe("Connection auth filter", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:User) + "CYPHER 5 + MATCH (this0:User) WHERE (this0.name = $param0 AND ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub))) WITH collect({ node: this0 }) AS edges WITH edges, size(edges) AS totalCount @@ -189,7 +191,8 @@ describe("Connection auth filter", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:User) + "CYPHER 5 + MATCH (this0:User) WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub)) WITH collect({ node: this0 }) AS edges WITH edges, size(edges) AS totalCount @@ -253,7 +256,8 @@ describe("Connection auth filter", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:User) + "CYPHER 5 + MATCH (this0:User) WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub)) WITH collect({ node: this0 }) AS edges WITH edges, size(edges) AS totalCount @@ -322,7 +326,8 @@ describe("Connection auth filter", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:User) + "CYPHER 5 + MATCH (this0:User) WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub)) WITH collect({ node: this0 }) AS edges WITH edges, size(edges) AS totalCount @@ -388,7 +393,8 @@ describe("Connection auth filter", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:User) + "CYPHER 5 + MATCH (this0:User) WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub)) WITH collect({ node: this0 }) AS edges WITH edges, size(edges) AS totalCount @@ -451,7 +457,8 @@ describe("Connection auth filter", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:User) + "CYPHER 5 + MATCH (this0:User) WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub)) WITH collect({ node: this0 }) AS edges WITH edges, size(edges) AS totalCount @@ -520,7 +527,8 @@ describe("Connection auth filter", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:User) + "CYPHER 5 + MATCH (this0:User) WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub)) WITH collect({ node: this0 }) AS edges WITH edges, size(edges) AS totalCount @@ -590,7 +598,8 @@ describe("Connection auth filter", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:User) + "CYPHER 5 + MATCH (this0:User) WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub)) WITH collect({ node: this0 }) AS edges WITH edges, size(edges) AS totalCount 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 90d83f6c97..6842060176 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 @@ -109,7 +109,8 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) WITH * WHERE ($isAuthenticated = true AND EXISTS { MATCH (this)<-[:HAS_CONTENT]-(this0:User) @@ -144,7 +145,8 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) WITH * WHERE (this.content = $param0 AND ($isAuthenticated = true AND EXISTS { MATCH (this)<-[:HAS_CONTENT]-(this0:User) @@ -185,7 +187,8 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) CALL { @@ -246,7 +249,8 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) CALL { @@ -308,7 +312,8 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) CALL { @@ -366,7 +371,8 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) WITH * WHERE ($isAuthenticated = true AND EXISTS { MATCH (this)<-[:HAS_CONTENT]-(this0:User) @@ -411,7 +417,8 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) WITH * WHERE (this.content = $param0 AND ($isAuthenticated = true AND EXISTS { MATCH (this)<-[:HAS_CONTENT]-(this0:User) @@ -457,7 +464,8 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) WITH this @@ -520,7 +528,8 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) WHERE ($isAuthenticated = true AND EXISTS { MATCH (this)<-[:HAS_CONTENT]-(this0:User) WHERE ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub) @@ -554,7 +563,8 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) WHERE (this.content = $param0 AND ($isAuthenticated = true AND EXISTS { MATCH (this)<-[:HAS_CONTENT]-(this0:User) WHERE ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub) @@ -589,7 +599,8 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) WITH * CALL { @@ -652,7 +663,8 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:User) SET this0.id = $this0_id SET this0.name = $this0_name @@ -744,7 +756,8 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:User) SET this0.id = $this0_id SET this0.name = $this0_name @@ -830,7 +843,8 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) WITH this @@ -915,7 +929,8 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) WITH this @@ -1001,7 +1016,8 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) WITH this @@ -1076,7 +1092,8 @@ describe("Cypher Auth Where", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) WITH this 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 3b65a5ac24..3dc00c9e99 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 @@ -91,7 +91,8 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) RETURN this { .id } AS this" @@ -125,7 +126,8 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE (this.name = $param0 AND ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub))) RETURN this { .id } AS this" @@ -163,7 +165,8 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) CALL { @@ -216,7 +219,8 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) CALL { @@ -274,7 +278,8 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) CALL { @@ -329,7 +334,8 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) CALL { @@ -381,7 +387,8 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) CALL { @@ -439,7 +446,8 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) CALL { @@ -498,7 +506,8 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) CALL { @@ -551,7 +560,8 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) SET this.name = $this_update_name_SET @@ -592,7 +602,8 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE (this.name = $param0 AND ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub))) SET this.name = $this_update_name_SET @@ -637,7 +648,8 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) WITH this @@ -698,7 +710,8 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) DETACH DELETE this" `); @@ -731,7 +744,8 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE (this.name = $param0 AND ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub))) DETACH DELETE this" `); @@ -765,7 +779,8 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) WITH * CALL { @@ -820,7 +835,8 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:User) SET this0.id = $this0_id SET this0.name = $this0_name @@ -898,7 +914,8 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:User) SET this0.id = $this0_id SET this0.name = $this0_name @@ -968,7 +985,8 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) WITH * @@ -1028,7 +1046,8 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) WITH * @@ -1089,7 +1108,8 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) WITH this @@ -1144,7 +1164,8 @@ describe("Cypher Auth Where", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) WITH this 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 fdd363bd4b..6d09eb69dd 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,7 +88,8 @@ describe("Cypher Auth Projection On Connections On Unions", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { 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 405c39eaec..6e4e026a32 100644 --- a/packages/graphql/tests/tck/directives/authorization/projection-connection.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/projection-connection.test.ts @@ -78,7 +78,8 @@ describe("Cypher Auth Projection On Connections", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { @@ -141,7 +142,8 @@ describe("Cypher Auth Projection On Connections", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { @@ -251,7 +253,8 @@ describe("Cypher Auth Projection On top-level connections", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:User) + "CYPHER 5 + MATCH (this0:User) WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH collect({ node: this0 }) AS edges WITH edges, size(edges) AS totalCount @@ -325,7 +328,8 @@ describe("Cypher Auth Projection On top-level connections", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:User) + "CYPHER 5 + MATCH (this0:User) WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH collect({ node: this0 }) AS edges WITH edges, size(edges) AS totalCount 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 3fc73b0444..7c698138cc 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 @@ -88,7 +88,8 @@ describe("Auth projections for interface relationship fields", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/directives/authorization/projection.test.ts b/packages/graphql/tests/tck/directives/authorization/projection.test.ts index 657c69cf5d..ef50a2fb3c 100644 --- a/packages/graphql/tests/tck/directives/authorization/projection.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/projection.test.ts @@ -65,7 +65,8 @@ describe("Cypher Auth Projection", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH this WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) SET this.id = $this_update_id_SET @@ -106,7 +107,8 @@ describe("Cypher Auth Projection", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:User) diff --git a/packages/graphql/tests/tck/directives/autogenerate.test.ts b/packages/graphql/tests/tck/directives/autogenerate.test.ts index 18ad6d879d..572c17626f 100644 --- a/packages/graphql/tests/tck/directives/autogenerate.test.ts +++ b/packages/graphql/tests/tck/directives/autogenerate.test.ts @@ -52,7 +52,8 @@ describe("Cypher autogenerate directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) @@ -90,7 +91,8 @@ describe("Cypher autogenerate directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) SET this.name = $this_update_name_SET 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 0975e5fc6b..7198bd49a4 100644 --- a/packages/graphql/tests/tck/directives/coalesce.test.ts +++ b/packages/graphql/tests/tck/directives/coalesce.test.ts @@ -89,7 +89,8 @@ describe("Cypher coalesce()", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE (coalesce(this.id, \\"00000000-00000000-00000000-00000000\\") = $param0 AND coalesce(this.name, \\"Jane Smith\\") =~ $param1 AND coalesce(this.numberOfFriends, 0) > $param2 AND coalesce(this.rating, 2.5) < $param3 AND this.fromInterface = $param4 AND coalesce(this.toBeOverridden, \\"Overridden\\") = $param5 AND NOT (coalesce(this.verified, false) = $param6)) RETURN this { .name } AS this" `); @@ -145,7 +146,8 @@ describe("Cypher coalesce()", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE coalesce(this.status, \\"ACTIVE\\") = $param0 RETURN this { .id, .status } AS this" `); @@ -202,7 +204,8 @@ describe("Cypher coalesce()", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this MATCH (this)-[this0:ACTED_IN]->(this1:Movie) @@ -265,7 +268,8 @@ describe("Cypher coalesce()", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this MATCH (this)-[this0:ACTED_IN]->(this1:Movie) diff --git a/packages/graphql/tests/tck/directives/customResolver.test.ts b/packages/graphql/tests/tck/directives/customResolver.test.ts index b21850c6d9..fae3ba092c 100644 --- a/packages/graphql/tests/tck/directives/customResolver.test.ts +++ b/packages/graphql/tests/tck/directives/customResolver.test.ts @@ -58,7 +58,8 @@ describe("@customResolver directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) RETURN this { .firstName } AS this" `); @@ -79,7 +80,8 @@ describe("@customResolver directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) RETURN this { .firstName, .lastName } AS this" `); @@ -99,7 +101,8 @@ describe("@customResolver directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) RETURN this { .firstName, .lastName } AS this" `); @@ -118,7 +121,8 @@ describe("@customResolver directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) RETURN this { .firstName, .lastName } AS this" `); @@ -161,7 +165,8 @@ describe("@customResolver directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) RETURN this { .firstName } AS this" `); @@ -180,7 +185,8 @@ describe("@customResolver directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) RETURN this { } AS this" `); @@ -246,7 +252,8 @@ describe("@customResolver directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Author) + "CYPHER 5 + MATCH (this:Author) CALL { WITH this CALL { @@ -281,7 +288,8 @@ describe("@customResolver directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Author) + "CYPHER 5 + MATCH (this:Author) RETURN this { .name } AS this" `); @@ -305,7 +313,8 @@ describe("@customResolver directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Author) + "CYPHER 5 + MATCH (this:Author) CALL { WITH this CALL { @@ -340,7 +349,8 @@ describe("@customResolver directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Author) + "CYPHER 5 + MATCH (this:Author) CALL { WITH this CALL { @@ -427,7 +437,8 @@ describe("@customResolver directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Author) + "CYPHER 5 + MATCH (this:Author) CALL { WITH this CALL { @@ -462,7 +473,8 @@ describe("@customResolver directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Author) + "CYPHER 5 + MATCH (this:Author) RETURN this { .name } AS this" `); @@ -486,7 +498,8 @@ describe("@customResolver directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Author) + "CYPHER 5 + MATCH (this:Author) CALL { WITH this CALL { @@ -521,7 +534,8 @@ describe("@customResolver directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Author) + "CYPHER 5 + MATCH (this:Author) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/directives/cypher/cypher-interface.test.ts b/packages/graphql/tests/tck/directives/cypher/cypher-interface.test.ts index 4ff33bc2ba..87c31dea3e 100644 --- a/packages/graphql/tests/tck/directives/cypher/cypher-interface.test.ts +++ b/packages/graphql/tests/tck/directives/cypher/cypher-interface.test.ts @@ -139,7 +139,8 @@ describe("Cypher directive on interface", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (n) WHERE (n:TVShow OR n:Movie) AND ($param0 IS NULL OR n.title = $param0) RETURN n @@ -184,7 +185,8 @@ describe("Cypher directive on interface", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (n) WHERE (n:TVShow OR n:Movie) AND ($param0 IS NULL OR n.title = $param0) RETURN n @@ -242,7 +244,8 @@ describe("Cypher directive on interface", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (n) WHERE (n:TVShow OR n:Movie) AND ($param0 IS NULL OR n.title = $param0) RETURN n @@ -321,7 +324,8 @@ describe("Cypher directive on interface", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (n) WHERE (n:TVShow OR n:Movie) AND ($param0 IS NULL OR n.title = $param0) RETURN n @@ -367,7 +371,8 @@ describe("Cypher directive on interface", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (n) WHERE (n:TVShow OR n:Movie) AND ($param0 IS NULL OR n.title = $param0) RETURN n @@ -426,7 +431,8 @@ describe("Cypher directive on interface", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (n) WHERE (n:TVShow OR n:Movie) AND ($param0 IS NULL OR n.title = $param0) RETURN n @@ -520,7 +526,8 @@ describe("Cypher directive on interface", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/directives/cypher/cypher-union.test.ts b/packages/graphql/tests/tck/directives/cypher/cypher-union.test.ts index 10b9556831..8c45991781 100644 --- a/packages/graphql/tests/tck/directives/cypher/cypher-union.test.ts +++ b/packages/graphql/tests/tck/directives/cypher/cypher-union.test.ts @@ -142,7 +142,8 @@ describe("Cypher directive on union", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (n) WHERE (n:TVShow OR n:Movie) AND ($param0 IS NULL OR n.title = $param0) RETURN n @@ -187,7 +188,8 @@ describe("Cypher directive on union", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (n) WHERE (n:TVShow OR n:Movie) AND ($param0 IS NULL OR n.title = $param0) RETURN n @@ -246,7 +248,8 @@ describe("Cypher directive on union", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (n) WHERE (n:TVShow OR n:Movie) AND ($param0 IS NULL OR n.title = $param0) RETURN n @@ -330,7 +333,8 @@ describe("Cypher directive on union", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (n) WHERE (n:TVShow OR n:Movie) AND ($param0 IS NULL OR n.title = $param0) RETURN n @@ -376,7 +380,8 @@ describe("Cypher directive on union", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (n) WHERE (n:TVShow OR n:Movie) AND ($param0 IS NULL OR n.title = $param0) RETURN n @@ -436,7 +441,8 @@ describe("Cypher directive on union", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (n) WHERE (n:TVShow OR n:Movie) AND ($param0 IS NULL OR n.title = $param0) RETURN n @@ -531,7 +537,8 @@ describe("Cypher directive on union", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/directives/cypher/cypher.test.ts b/packages/graphql/tests/tck/directives/cypher/cypher.test.ts index 26947aa7d3..950ea3ae26 100644 --- a/packages/graphql/tests/tck/directives/cypher/cypher.test.ts +++ b/packages/graphql/tests/tck/directives/cypher/cypher.test.ts @@ -113,7 +113,8 @@ describe("Cypher directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -144,7 +145,8 @@ describe("Cypher directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this CALL { @@ -173,7 +175,8 @@ describe("Cypher directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WITH * LIMIT $param0 CALL { @@ -211,7 +214,8 @@ describe("Cypher directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this CALL { @@ -256,7 +260,8 @@ describe("Cypher directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -315,7 +320,8 @@ describe("Cypher directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -393,7 +399,8 @@ describe("Cypher directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -469,7 +476,8 @@ describe("Cypher directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (m:Movie {title: $param0}) RETURN m } @@ -532,7 +540,8 @@ describe("Cypher directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (m:Movie {title: $param0}) RETURN m } @@ -594,7 +603,8 @@ describe("Cypher directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-aggregation.test.ts b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-aggregation.test.ts index 2616f8179c..6df76c489a 100644 --- a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-aggregation.test.ts +++ b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-aggregation.test.ts @@ -54,7 +54,8 @@ describe("cypher directive filtering - Aggregation", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) CALL { WITH this @@ -117,7 +118,8 @@ describe("cypher directive filtering - Aggregation", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) CALL { WITH this @@ -180,7 +182,8 @@ describe("cypher directive filtering - Aggregation", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) CALL { WITH this @@ -244,7 +247,8 @@ describe("cypher directive filtering - Aggregation", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Movie) CALL { WITH this diff --git a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-auth.test.ts b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-auth.test.ts index a9978323b7..537ddda2ff 100644 --- a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-auth.test.ts +++ b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-auth.test.ts @@ -66,7 +66,8 @@ describe("cypher directive filtering - Auth", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -136,7 +137,8 @@ describe("cypher directive filtering - Auth", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -216,7 +218,8 @@ describe("cypher directive filtering - Auth", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) RETURN this { .title } AS this" `); @@ -269,7 +272,8 @@ describe("cypher directive filtering - Auth", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this MATCH (this)-[:ACTED_IN]->(this0:Movie) @@ -346,7 +350,8 @@ describe("cypher directive filtering - Auth", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -418,7 +423,8 @@ describe("cypher directive filtering - Auth", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-connect.test.ts b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-connect.test.ts index 3adfa54f1e..d60a5d3ff5 100644 --- a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-connect.test.ts +++ b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-connect.test.ts @@ -77,7 +77,8 @@ describe("cypher directive filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:Movie) SET this0.title = $this0_title WITH * diff --git a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-list-auth.test.ts b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-list-auth.test.ts index eac3d1bb37..43c5a9c309 100644 --- a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-list-auth.test.ts +++ b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-list-auth.test.ts @@ -67,7 +67,8 @@ describe("cypher directive filtering - List Auth", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -153,7 +154,8 @@ describe("cypher directive filtering - List Auth", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -226,7 +228,8 @@ describe("cypher directive filtering - List Auth", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -311,7 +314,8 @@ describe("cypher directive filtering - List Auth", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) RETURN this { .title } AS this" `); @@ -365,7 +369,8 @@ describe("cypher directive filtering - List Auth", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this MATCH (this)-[:ACTED_IN]->(this0:Movie) @@ -445,7 +450,8 @@ describe("cypher directive filtering - List Auth", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -519,7 +525,8 @@ describe("cypher directive filtering - List Auth", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-list.test.ts b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-list.test.ts index 22563b11aa..df6c60f92a 100644 --- a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-list.test.ts +++ b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-list.test.ts @@ -50,7 +50,8 @@ describe("cypher directive filtering - Lists", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-misc.test.ts b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-misc.test.ts index 5a79ecf763..009a5aba99 100644 --- a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-misc.test.ts +++ b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-misc.test.ts @@ -62,7 +62,8 @@ describe("cypher directive filtering - Auth", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -144,7 +145,8 @@ describe("cypher directive filtering - Auth", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this MATCH (this)-[this0:ACTED_IN]->(this1:Movie) @@ -212,7 +214,8 @@ describe("cypher directive filtering - Auth", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -296,7 +299,8 @@ describe("cypher directive filtering - Auth", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -385,7 +389,8 @@ describe("cypher directive filtering - Auth", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-one-to-one-relationship.test.ts b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-one-to-one-relationship.test.ts index f83b927439..3d5a7158f7 100644 --- a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-one-to-one-relationship.test.ts +++ b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-one-to-one-relationship.test.ts @@ -65,7 +65,8 @@ describe("cypher directive filtering - One To One Relationship", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -133,7 +134,8 @@ describe("cypher directive filtering - One To One Relationship", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -210,7 +212,8 @@ describe("cypher directive filtering - One To One Relationship", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -289,7 +292,8 @@ describe("cypher directive filtering - One To One Relationship", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -359,7 +363,8 @@ describe("cypher directive filtering - One To One Relationship", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -445,7 +450,8 @@ describe("cypher directive filtering - One To One Relationship", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Person) + "CYPHER 5 + MATCH (this:Person) CALL { WITH this CALL { @@ -568,7 +574,8 @@ describe("cypher directive filtering - One To One Relationship", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Person) + "CYPHER 5 + MATCH (this:Person) CALL { WITH this CALL { @@ -692,7 +699,8 @@ describe("cypher directive filtering - One To One Relationship", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Person) + "CYPHER 5 + MATCH (this:Person) CALL { WITH this CALL { @@ -816,7 +824,8 @@ describe("cypher directive filtering - One To One Relationship", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Person) + "CYPHER 5 + MATCH (this:Person) CALL { WITH this CALL { @@ -941,7 +950,8 @@ describe("cypher directive filtering - One To One Relationship", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Person) + "CYPHER 5 + MATCH (this:Person) CALL { WITH this CALL { @@ -1066,7 +1076,8 @@ describe("cypher directive filtering - One To One Relationship", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Person) + "CYPHER 5 + MATCH (this:Person) CALL { WITH this CALL { @@ -1190,7 +1201,8 @@ describe("cypher directive filtering - One To One Relationship", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Person) + "CYPHER 5 + MATCH (this:Person) CALL { WITH this CALL { @@ -1314,7 +1326,8 @@ describe("cypher directive filtering - One To One Relationship", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Person) + "CYPHER 5 + MATCH (this:Person) CALL { WITH this CALL { @@ -1439,7 +1452,8 @@ describe("cypher directive filtering - One To One Relationship", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Person) + "CYPHER 5 + MATCH (this:Person) CALL { WITH this CALL { @@ -1565,7 +1579,8 @@ describe("cypher directive filtering - One To One Relationship", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-scalar.test.ts b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-scalar.test.ts index 853ffd7b82..7a399b05f5 100644 --- a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-scalar.test.ts +++ b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-scalar.test.ts @@ -51,7 +51,8 @@ describe("cypher directive filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -120,7 +121,8 @@ describe("cypher directive filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -189,7 +191,8 @@ describe("cypher directive filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-sorting.test.ts b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-sorting.test.ts index 8b445d42bf..c1acbcb76f 100644 --- a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-sorting.test.ts +++ b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-sorting.test.ts @@ -60,7 +60,8 @@ describe("cypher directive filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -142,7 +143,8 @@ describe("cypher directive filtering", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-spatial.test.ts b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-spatial.test.ts index e65ea8f1d9..6090e13245 100644 --- a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-spatial.test.ts +++ b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-spatial.test.ts @@ -54,7 +54,8 @@ describe("cypher directive filtering - Auth", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -127,7 +128,8 @@ describe("cypher directive filtering - Auth", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-temporal.test.ts b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-temporal.test.ts index 7787ea9fdc..12e93dd912 100644 --- a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-temporal.test.ts +++ b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-temporal.test.ts @@ -51,7 +51,8 @@ describe("cypher directive filtering - Auth", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -112,7 +113,8 @@ describe("cypher directive filtering - Auth", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/directives/cypher/filtering/relationships/cypher-filtering-relationship-auth.test.ts b/packages/graphql/tests/tck/directives/cypher/filtering/relationships/cypher-filtering-relationship-auth.test.ts index 4f95df31a5..8e9c08e087 100644 --- a/packages/graphql/tests/tck/directives/cypher/filtering/relationships/cypher-filtering-relationship-auth.test.ts +++ b/packages/graphql/tests/tck/directives/cypher/filtering/relationships/cypher-filtering-relationship-auth.test.ts @@ -80,7 +80,8 @@ describe("cypher directive filtering - relationship auth filter", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:Movie) + "CYPHER 5 + MATCH (this0:Movie) CALL { WITH this0 CALL { @@ -174,7 +175,8 @@ describe("cypher directive filtering - relationship auth filter", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:Movie) + "CYPHER 5 + MATCH (this0:Movie) CALL { WITH this0 CALL { @@ -268,7 +270,8 @@ describe("cypher directive filtering - relationship auth filter", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:Movie) + "CYPHER 5 + MATCH (this0:Movie) CALL { WITH this0 CALL { @@ -362,7 +365,8 @@ describe("cypher directive filtering - relationship auth filter", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:Movie) + "CYPHER 5 + MATCH (this0:Movie) CALL { WITH this0 CALL { diff --git a/packages/graphql/tests/tck/directives/cypher/filtering/relationships/cypher-filtering-relationship-connection.test.ts b/packages/graphql/tests/tck/directives/cypher/filtering/relationships/cypher-filtering-relationship-connection.test.ts index 0f8327a93a..dcc2eb717f 100644 --- a/packages/graphql/tests/tck/directives/cypher/filtering/relationships/cypher-filtering-relationship-connection.test.ts +++ b/packages/graphql/tests/tck/directives/cypher/filtering/relationships/cypher-filtering-relationship-connection.test.ts @@ -67,7 +67,8 @@ describe("Connection API - cypher directive filtering - Relationship", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:Movie) + "CYPHER 5 + MATCH (this0:Movie) CALL { WITH this0 CALL { @@ -144,7 +145,8 @@ describe("Connection API - cypher directive filtering - Relationship", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:Movie) + "CYPHER 5 + MATCH (this0:Movie) CALL { WITH this0 CALL { @@ -221,7 +223,8 @@ describe("Connection API - cypher directive filtering - Relationship", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:Movie) + "CYPHER 5 + MATCH (this0:Movie) CALL { WITH this0 CALL { @@ -298,7 +301,8 @@ describe("Connection API - cypher directive filtering - Relationship", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:Movie) + "CYPHER 5 + MATCH (this0:Movie) CALL { WITH this0 CALL { @@ -375,7 +379,8 @@ describe("Connection API - cypher directive filtering - Relationship", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:Movie) + "CYPHER 5 + MATCH (this0:Movie) CALL { WITH this0 CALL { @@ -454,7 +459,8 @@ describe("Connection API - cypher directive filtering - Relationship", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:Movie) + "CYPHER 5 + MATCH (this0:Movie) CALL { WITH this0 CALL { @@ -558,7 +564,8 @@ describe("Connection API - cypher directive filtering - Relationship", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:Movie) + "CYPHER 5 + MATCH (this0:Movie) CALL { WITH this0 CALL { diff --git a/packages/graphql/tests/tck/directives/cypher/filtering/relationships/cypher-filtering-relationship.test.ts b/packages/graphql/tests/tck/directives/cypher/filtering/relationships/cypher-filtering-relationship.test.ts index 511a43c9bd..143184bbf8 100644 --- a/packages/graphql/tests/tck/directives/cypher/filtering/relationships/cypher-filtering-relationship.test.ts +++ b/packages/graphql/tests/tck/directives/cypher/filtering/relationships/cypher-filtering-relationship.test.ts @@ -63,7 +63,8 @@ describe("cypher directive filtering - Relationship", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -128,7 +129,8 @@ describe("cypher directive filtering - Relationship", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -193,7 +195,8 @@ describe("cypher directive filtering - Relationship", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -258,7 +261,8 @@ describe("cypher directive filtering - Relationship", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -322,7 +326,8 @@ describe("cypher directive filtering - Relationship", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -414,7 +419,8 @@ describe("cypher directive filtering - Relationship", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { 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 18c4151611..1d525fe249 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 @@ -90,7 +90,8 @@ describe("Interface Relationships - Create connect", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:Actor) SET this0.name = $this0_name WITH * 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 b32fb93450..ffcec5a758 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 @@ -90,7 +90,8 @@ describe("Interface Relationships - Create create", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:Actor) SET this0.name = $this0_name WITH * 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 584f775bc0..3d48f22835 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 @@ -71,7 +71,8 @@ describe("Interface Relationships - Delete delete", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WITH * CALL { WITH * @@ -127,7 +128,8 @@ describe("Interface Relationships - Delete delete", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WITH * CALL { WITH * 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 1d44d0b351..dbafbb97db 100644 --- a/packages/graphql/tests/tck/directives/interface-relationships/read.test.ts +++ b/packages/graphql/tests/tck/directives/interface-relationships/read.test.ts @@ -75,7 +75,8 @@ describe("Interface Relationships", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this CALL { @@ -118,7 +119,8 @@ describe("Interface Relationships", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this CALL { @@ -182,7 +184,8 @@ describe("Interface Relationships", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this CALL { @@ -235,7 +238,8 @@ describe("Interface Relationships", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this CALL { 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 e2efef2812..a17ee1c544 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 @@ -78,7 +78,8 @@ describe("Interface Relationships - Update connect", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WITH this CALL { WITH this @@ -170,7 +171,8 @@ describe("Interface Relationships - Update connect", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WITH this CALL { WITH this 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 30f89d9c3f..7650b36864 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 @@ -87,7 +87,8 @@ describe("Interface Relationships - Update create", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WITH this CALL { WITH this 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 84d124518b..f59d8b0ae9 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 @@ -72,7 +72,8 @@ describe("Interface Relationships - Update delete", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WITH this CALL { WITH this @@ -185,7 +186,8 @@ describe("Interface Relationships - Update delete", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WITH this CALL { WITH this 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 a865cbdcef..9020475dba 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,7 +74,8 @@ describe("Interface Relationships - Update disconnect", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WITH this CALL { WITH this @@ -166,7 +167,8 @@ describe("Interface Relationships - Update disconnect", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WITH this CALL { WITH this 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 b1c97549df..e22cedf101 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 @@ -79,7 +79,8 @@ describe("Interface Relationships - Update update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WITH this CALL { WITH this @@ -160,7 +161,8 @@ describe("Interface Relationships - Update update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WITH this CALL { WITH this 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 e75afe9686..0074d93355 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 @@ -55,7 +55,8 @@ describe("Node directive with additionalLabels", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Film:Multimedia) + "CYPHER 5 + MATCH (this:Film:Multimedia) RETURN this { .title } AS this" `); @@ -77,7 +78,8 @@ describe("Node directive with additionalLabels", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Film:Multimedia) + "CYPHER 5 + MATCH (this:Film:Multimedia) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor:Person) @@ -110,7 +112,8 @@ describe("Node directive with additionalLabels", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Film:Multimedia) @@ -175,7 +178,8 @@ describe("Node directive with additionalLabels", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Film:Multimedia) + "CYPHER 5 + MATCH (this:Film:Multimedia) WHERE this.id = $param0 DETACH DELETE this" `); @@ -201,7 +205,8 @@ describe("Node directive with additionalLabels", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Film:Multimedia) + "CYPHER 5 + MATCH (this:Film:Multimedia) WHERE this.id = $param0 SET this.id = $this_update_id_SET RETURN collect(DISTINCT this { .id }) AS data" diff --git a/packages/graphql/tests/tck/directives/node/node-label-interface.test.ts b/packages/graphql/tests/tck/directives/node/node-label-interface.test.ts index 410ed25c4c..6a117c2da3 100644 --- a/packages/graphql/tests/tck/directives/node/node-label-interface.test.ts +++ b/packages/graphql/tests/tck/directives/node/node-label-interface.test.ts @@ -65,7 +65,8 @@ describe("Node directive with interface", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Film) + "CYPHER 5 + MATCH (this:Film) WHERE this.title = $param0 CALL { WITH this 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 0c836b2f8e..ad17cc8f21 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 @@ -60,7 +60,8 @@ describe("Label in Node directive", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Film) + "CYPHER 5 + MATCH (this:Film) RETURN this { .title } AS this" `); @@ -83,7 +84,8 @@ describe("Label in Node directive", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor:Person) + "CYPHER 5 + MATCH (this:Actor:Person) WHERE this.age > $param0 CALL { WITH this @@ -122,7 +124,8 @@ describe("Label in Node directive", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Film) 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 972a1263aa..3812cb3203 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 @@ -66,7 +66,8 @@ describe("Node directive with unions", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Film) + "CYPHER 5 + MATCH (this:Film) WHERE this.title = $param0 CALL { WITH this 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 4473bb6139..8acecbd650 100644 --- a/packages/graphql/tests/tck/directives/node/node-label.test.ts +++ b/packages/graphql/tests/tck/directives/node/node-label.test.ts @@ -55,7 +55,8 @@ describe("Label in Node directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Film) + "CYPHER 5 + MATCH (this:Film) RETURN this { .title } AS this" `); @@ -77,7 +78,8 @@ describe("Label in Node directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Film) + "CYPHER 5 + MATCH (this:Film) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Person) @@ -110,7 +112,8 @@ describe("Label in Node directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Film) + "CYPHER 5 + MATCH (this:Film) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Person) @@ -144,7 +147,8 @@ describe("Label in Node directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Film) @@ -185,7 +189,8 @@ describe("Label in Node directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Film) @@ -252,7 +257,8 @@ describe("Label in Node directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Film) + "CYPHER 5 + MATCH (this:Film) WHERE this.id = $param0 SET this.id = $this_update_id_SET RETURN collect(DISTINCT this { .id }) AS data" @@ -291,7 +297,8 @@ describe("Label in Node directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Film) + "CYPHER 5 + MATCH (this:Film) WHERE this.id = $param0 WITH this CALL { @@ -353,7 +360,8 @@ describe("Label in Node directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Film) + "CYPHER 5 + MATCH (this:Film) WHERE this.id = $param0 WITH * CALL { @@ -402,7 +410,8 @@ describe("Label in Node directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Film) + "CYPHER 5 + MATCH (this:Film) WHERE this.id = $param0 WITH this CALL { @@ -462,7 +471,8 @@ describe("Label in Node directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Film) + "CYPHER 5 + MATCH (this:Film) WHERE this.id = $param0 DETACH DELETE this" `); @@ -489,7 +499,8 @@ describe("Label in Node directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Film) + "CYPHER 5 + MATCH (this:Film) WHERE this.id = $param0 WITH * CALL { @@ -527,7 +538,8 @@ describe("Label in Node directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Film) + "CYPHER 5 + MATCH (this:Film) WHERE EXISTS { MATCH (this)<-[:ACTED_IN]-(this0:Person) WHERE this0.name = $param0 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 b9c415d48b..8706460771 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,7 +74,8 @@ describe("Cypher Auth Projection On Connections", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Person) + "CYPHER 5 + MATCH (this:Person) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { 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 7c3d45060f..811474e98c 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 @@ -80,7 +80,8 @@ describe("Node Directive", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Person) + "CYPHER 5 + MATCH (this:Person) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN this { .id } AS this" @@ -112,7 +113,8 @@ describe("Node Directive", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Comment) + "CYPHER 5 + MATCH (this:Comment) WHERE (EXISTS { MATCH (this)<-[:HAS_POST]-(this0:Person) WHERE this0.id = $param0 diff --git a/packages/graphql/tests/tck/directives/plural.test.ts b/packages/graphql/tests/tck/directives/plural.test.ts index 5ef15b1308..63fd60b5a7 100644 --- a/packages/graphql/tests/tck/directives/plural.test.ts +++ b/packages/graphql/tests/tck/directives/plural.test.ts @@ -48,7 +48,8 @@ describe("Plural directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Tech) + "CYPHER 5 + MATCH (this:Tech) RETURN this { .name } AS this" `); @@ -67,7 +68,8 @@ describe("Plural directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this:Tech) RETURN count(this) AS var0 } @@ -91,7 +93,8 @@ describe("Plural directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Tech) @@ -127,7 +130,8 @@ describe("Plural directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Tech) + "CYPHER 5 + MATCH (this:Tech) SET this.name = $this_update_name_SET RETURN collect(DISTINCT this { .name }) AS data" `); @@ -152,7 +156,8 @@ describe("Plural directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Tech) + "CYPHER 5 + MATCH (this:Tech) WHERE this.name = $param0 DETACH DELETE this" `); @@ -176,7 +181,8 @@ describe("Plural directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Tech) + "CYPHER 5 + 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 be5798be3b..acae1abca6 100644 --- a/packages/graphql/tests/tck/directives/relationship.test.ts +++ b/packages/graphql/tests/tck/directives/relationship.test.ts @@ -64,7 +64,8 @@ describe("Cypher relationship", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) diff --git a/packages/graphql/tests/tck/directives/vector/auth.test.ts b/packages/graphql/tests/tck/directives/vector/auth.test.ts index ab53c6ecae..de85dbb9bf 100644 --- a/packages/graphql/tests/tck/directives/vector/auth.test.ts +++ b/packages/graphql/tests/tck/directives/vector/auth.test.ts @@ -85,7 +85,8 @@ describe("Cypher -> vector -> Auth", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL db.index.vector.queryNodes(\\"movie_index\\", 4, $param0) YIELD node AS this0, score AS var1 + "CYPHER 5 + CALL db.index.vector.queryNodes(\\"movie_index\\", 4, $param0) YIELD node AS this0, score AS var1 WHERE ($param1 IN labels(this0) AND ($isAuthenticated = true AND EXISTS { MATCH (this0)<-[:DIRECTED]-(this2:Person) WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) @@ -284,7 +285,8 @@ describe("Cypher -> vector -> Auth", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL db.index.vector.queryNodes(\\"movie_index\\", 4, $param0) YIELD node AS this0, score AS var1 + "CYPHER 5 + CALL db.index.vector.queryNodes(\\"movie_index\\", 4, $param0) YIELD node AS this0, score AS var1 WHERE ($param1 IN labels(this0) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { MATCH (this0)<-[:DIRECTED]-(this2:Person) WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) @@ -485,7 +487,8 @@ describe("Cypher -> vector -> Auth", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL db.index.vector.queryNodes(\\"movie_index\\", 4, $param0) YIELD node AS this0, score AS var1 + "CYPHER 5 + CALL db.index.vector.queryNodes(\\"movie_index\\", 4, $param0) YIELD node AS this0, score AS var1 WHERE ($param1 IN labels(this0) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (EXISTS { MATCH (this0)<-[:DIRECTED]-(this2:Person) WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) @@ -691,7 +694,8 @@ describe("Cypher -> vector -> Auth", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL db.index.vector.queryNodes(\\"movie_index\\", 4, $param0) YIELD node AS this0, score AS var1 + "CYPHER 5 + CALL db.index.vector.queryNodes(\\"movie_index\\", 4, $param0) YIELD node AS this0, score AS var1 WHERE ($param1 IN labels(this0) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { MATCH (this0)<-[this2:DIRECTED]-(this3:Person) WHERE ($jwt.sub IS NOT NULL AND this3.id = $jwt.sub) @@ -897,7 +901,8 @@ describe("Cypher -> vector -> Auth", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL db.index.vector.queryNodes(\\"movie_index\\", 4, $param0) YIELD node AS this0, score AS var1 + "CYPHER 5 + CALL db.index.vector.queryNodes(\\"movie_index\\", 4, $param0) YIELD node AS this0, score AS var1 WHERE ($param1 IN labels(this0) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (EXISTS { MATCH (this0)<-[this2:DIRECTED]-(this3:Person) WHERE ($jwt.sub IS NOT NULL AND this3.id = $jwt.sub) @@ -1107,7 +1112,8 @@ describe("Cypher -> vector -> Auth", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL db.index.vector.queryNodes(\\"movie_index\\", 4, $param0) YIELD node AS this0, score AS var1 + "CYPHER 5 + CALL db.index.vector.queryNodes(\\"movie_index\\", 4, $param0) YIELD node AS this0, score AS var1 WHERE ($param1 IN labels(this0) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { MATCH (this0)<-[this2:DIRECTED]-(this3:Person) WHERE ($param3 IS NOT NULL AND this2.year = $param3) @@ -1311,7 +1317,8 @@ describe("Cypher -> vector -> Auth", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL db.index.vector.queryNodes(\\"movie_index\\", 4, $param0) YIELD node AS this0, score AS var1 + "CYPHER 5 + CALL db.index.vector.queryNodes(\\"movie_index\\", 4, $param0) YIELD node AS this0, score AS var1 WHERE ($param1 IN labels(this0) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (EXISTS { MATCH (this0)<-[this2:DIRECTED]-(this3:Person) WHERE ($param3 IS NOT NULL AND this2.year = $param3) diff --git a/packages/graphql/tests/tck/directives/vector/match.test.ts b/packages/graphql/tests/tck/directives/vector/match.test.ts index 3bef8ee799..92efe42df9 100644 --- a/packages/graphql/tests/tck/directives/vector/match.test.ts +++ b/packages/graphql/tests/tck/directives/vector/match.test.ts @@ -75,18 +75,19 @@ describe("Vector index match", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL db.index.vector.queryNodes(\\"movie_index\\", 4, $param0) YIELD node AS this0, score AS var1 - WHERE $param1 IN labels(this0) - WITH collect({ node: this0, score: var1 }) AS edges - WITH edges, size(edges) AS totalCount - CALL { - WITH edges - UNWIND edges AS edge - WITH edge.node AS this0, edge.score AS var1 - RETURN collect({ node: { title: this0.title, __resolveType: \\"Movie\\" }, score: var1 }) AS var2 - } - RETURN { edges: var2, totalCount: totalCount } AS this" - `); + "CYPHER 5 + CALL db.index.vector.queryNodes(\\"movie_index\\", 4, $param0) YIELD node AS this0, score AS var1 + WHERE $param1 IN labels(this0) + WITH collect({ node: this0, score: var1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this0, edge.score AS var1 + RETURN collect({ node: { title: this0.title, __resolveType: \\"Movie\\" }, score: var1 }) AS var2 + } + RETURN { edges: var2, totalCount: totalCount } AS this" + `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ @@ -248,7 +249,8 @@ describe("Vector index match", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL db.index.vector.queryNodes(\\"movie_index\\", 4, $param0) YIELD node AS this0, score AS var1 + "CYPHER 5 + CALL db.index.vector.queryNodes(\\"movie_index\\", 4, $param0) YIELD node AS this0, score AS var1 WHERE ($param1 IN labels(this0) AND this0.released > $param2) WITH collect({ node: this0, score: var1 }) AS edges WITH edges, size(edges) AS totalCount @@ -423,7 +425,8 @@ describe("Vector index match", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL db.index.vector.queryNodes(\\"movie_index\\", 4, $param0) YIELD node AS this0, score AS var1 + "CYPHER 5 + CALL db.index.vector.queryNodes(\\"movie_index\\", 4, $param0) YIELD node AS this0, score AS var1 WHERE $param1 IN labels(this0) WITH collect({ node: this0, score: var1 }) AS edges WITH edges, size(edges) AS totalCount diff --git a/packages/graphql/tests/tck/directives/vector/phrase.test.ts b/packages/graphql/tests/tck/directives/vector/phrase.test.ts index 0047bfdf62..7695c0de1c 100644 --- a/packages/graphql/tests/tck/directives/vector/phrase.test.ts +++ b/packages/graphql/tests/tck/directives/vector/phrase.test.ts @@ -85,7 +85,8 @@ describe("phrase input - genAI plugin", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "WITH genai.vector.encode($param0, \\"OpenAI\\", { token: \\"my-token\\", model: \\"my-model\\", dimensions: 256 }) AS var0 + "CYPHER 5 + WITH genai.vector.encode($param0, \\"OpenAI\\", { token: \\"my-token\\", model: \\"my-model\\", dimensions: 256 }) AS var0 CALL db.index.vector.queryNodes(\\"movie_index\\", 4, var0) YIELD node AS this1, score AS var2 WHERE $param1 IN labels(this1) WITH collect({ node: this1, score: var2 }) AS edges diff --git a/packages/graphql/tests/tck/directives/vector/score.test.ts b/packages/graphql/tests/tck/directives/vector/score.test.ts index 290a4a38c1..bb5972a865 100644 --- a/packages/graphql/tests/tck/directives/vector/score.test.ts +++ b/packages/graphql/tests/tck/directives/vector/score.test.ts @@ -73,7 +73,8 @@ describe("Cypher -> vector -> Score", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL db.index.vector.queryNodes(\\"movie_index\\", 4, $param0) YIELD node AS this0, score AS var1 + "CYPHER 5 + CALL db.index.vector.queryNodes(\\"movie_index\\", 4, $param0) YIELD node AS this0, score AS var1 WHERE ($param1 IN labels(this0) AND var1 >= $param2) WITH collect({ node: this0, score: var1 }) AS edges WITH edges, size(edges) AS totalCount @@ -245,7 +246,8 @@ describe("Cypher -> vector -> Score", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL db.index.vector.queryNodes(\\"movie_index\\", 4, $param0) YIELD node AS this0, score AS var1 + "CYPHER 5 + CALL db.index.vector.queryNodes(\\"movie_index\\", 4, $param0) YIELD node AS this0, score AS var1 WHERE $param1 IN labels(this0) WITH collect({ node: this0, score: var1 }) AS edges WITH edges, size(edges) AS totalCount @@ -418,7 +420,8 @@ describe("Cypher -> vector -> Score", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL db.index.vector.queryNodes(\\"movie_index\\", 4, $param0) YIELD node AS this0, score AS var1 + "CYPHER 5 + CALL db.index.vector.queryNodes(\\"movie_index\\", 4, $param0) YIELD node AS this0, score AS var1 WHERE $param1 IN labels(this0) WITH collect({ node: this0, score: var1 }) AS edges WITH edges, size(edges) AS totalCount diff --git a/packages/graphql/tests/tck/federation/authorization.test.ts b/packages/graphql/tests/tck/federation/authorization.test.ts index 653d08aeff..b64e228180 100644 --- a/packages/graphql/tests/tck/federation/authorization.test.ts +++ b/packages/graphql/tests/tck/federation/authorization.test.ts @@ -68,7 +68,8 @@ describe("Federation and authorization", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE (this.id = $param0 AND ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub))) RETURN this { .id, .name } AS this" @@ -130,7 +131,8 @@ describe("Federation and authorization", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE (this.id = $param0 AND ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub))) RETURN this { .id, .name, .password } AS this" @@ -199,7 +201,8 @@ describe("Federation and authorization", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:AUTHORED]-(this1:User) diff --git a/packages/graphql/tests/tck/fragments.test.ts b/packages/graphql/tests/tck/fragments.test.ts index c0f99a3873..6ea05bb074 100644 --- a/packages/graphql/tests/tck/fragments.test.ts +++ b/packages/graphql/tests/tck/fragments.test.ts @@ -76,7 +76,8 @@ describe("Cypher Fragment", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) RETURN this { .id, .username } AS this" `); @@ -101,7 +102,8 @@ describe("Cypher Fragment", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) CALL { WITH this CALL { @@ -141,7 +143,8 @@ describe("Cypher Fragment", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) RETURN this { .username, .id } AS this" `); @@ -209,7 +212,8 @@ describe("Cypher Fragment", () => { const result = await translateQuery(testNeoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WHERE this.name = $param0 CALL { WITH this diff --git a/packages/graphql/tests/tck/fulltext/auth.test.ts b/packages/graphql/tests/tck/fulltext/auth.test.ts index 65e05e0666..4c73c2ce13 100644 --- a/packages/graphql/tests/tck/fulltext/auth.test.ts +++ b/packages/graphql/tests/tck/fulltext/auth.test.ts @@ -78,7 +78,8 @@ describe("Cypher -> fulltext -> Auth", () => { const result = await translateQuery(neoSchema, query, { token, neo4jVersion: "5" }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this0, score AS var1 + "CYPHER 5 + CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this0, score AS var1 WHERE ($param1 IN labels(this0) AND ($isAuthenticated = true AND EXISTS { MATCH (this0)<-[:DIRECTED]-(this2:Person) WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) @@ -150,7 +151,8 @@ describe("Cypher -> fulltext -> Auth", () => { const result = await translateQuery(neoSchema, query, { token, neo4jVersion: "5" }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this0, score AS var1 + "CYPHER 5 + CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this0, score AS var1 WHERE ($param1 IN labels(this0) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { MATCH (this0)<-[:DIRECTED]-(this2:Person) WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) @@ -222,7 +224,8 @@ describe("Cypher -> fulltext -> Auth", () => { const result = await translateQuery(neoSchema, query, { token, neo4jVersion: "5" }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this0, score AS var1 + "CYPHER 5 + CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this0, score AS var1 WHERE ($param1 IN labels(this0) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (EXISTS { MATCH (this0)<-[:DIRECTED]-(this2:Person) WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) @@ -302,7 +305,8 @@ describe("Cypher -> fulltext -> Auth", () => { const result = await translateQuery(neoSchema, query, { token, neo4jVersion: "5" }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this0, score AS var1 + "CYPHER 5 + CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this0, score AS var1 WHERE ($param1 IN labels(this0) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { MATCH (this0)<-[this2:DIRECTED]-(this3:Person) WHERE ($jwt.sub IS NOT NULL AND this3.id = $jwt.sub) @@ -379,7 +383,8 @@ describe("Cypher -> fulltext -> Auth", () => { const result = await translateQuery(neoSchema, query, { token, neo4jVersion: "5" }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this0, score AS var1 + "CYPHER 5 + CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this0, score AS var1 WHERE ($param1 IN labels(this0) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (EXISTS { MATCH (this0)<-[this2:DIRECTED]-(this3:Person) WHERE ($jwt.sub IS NOT NULL AND this3.id = $jwt.sub) @@ -463,7 +468,8 @@ describe("Cypher -> fulltext -> Auth", () => { const result = await translateQuery(neoSchema, query, { token, neo4jVersion: "5" }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this0, score AS var1 + "CYPHER 5 + CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this0, score AS var1 WHERE ($param1 IN labels(this0) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { MATCH (this0)<-[this2:DIRECTED]-(this3:Person) WHERE ($param3 IS NOT NULL AND this2.year = $param3) @@ -541,7 +547,8 @@ describe("Cypher -> fulltext -> Auth", () => { const result = await translateQuery(neoSchema, query, { token, neo4jVersion: "5" }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this0, score AS var1 + "CYPHER 5 + CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this0, score AS var1 WHERE ($param1 IN labels(this0) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (EXISTS { MATCH (this0)<-[this2:DIRECTED]-(this3:Person) WHERE ($param3 IS NOT NULL AND this2.year = $param3) diff --git a/packages/graphql/tests/tck/fulltext/match.test.ts b/packages/graphql/tests/tck/fulltext/match.test.ts index 987deb8c80..4469616ed1 100644 --- a/packages/graphql/tests/tck/fulltext/match.test.ts +++ b/packages/graphql/tests/tck/fulltext/match.test.ts @@ -54,7 +54,8 @@ describe("Cypher -> fulltext -> Match", () => { const result = await translateQuery(neoSchema, query, {}); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this0, score AS var1 + "CYPHER 5 + CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this0, score AS var1 WHERE $param1 IN labels(this0) WITH collect({ node: this0 }) AS edges WITH edges, size(edges) AS totalCount @@ -91,7 +92,8 @@ describe("Cypher -> fulltext -> Match", () => { const result = await translateQuery(neoSchema, query, {}); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this0, score AS var1 + "CYPHER 5 + CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this0, score AS var1 WHERE ($param1 IN labels(this0) AND this0.title = $param2) WITH collect({ node: this0 }) AS edges WITH edges, size(edges) AS totalCount diff --git a/packages/graphql/tests/tck/fulltext/node-labels.test.ts b/packages/graphql/tests/tck/fulltext/node-labels.test.ts index 169d0d2f47..5571af2750 100644 --- a/packages/graphql/tests/tck/fulltext/node-labels.test.ts +++ b/packages/graphql/tests/tck/fulltext/node-labels.test.ts @@ -50,7 +50,8 @@ describe("Cypher -> fulltext -> Additional Labels", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this0, score AS var1 + "CYPHER 5 + CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this0, score AS var1 WHERE ($param1 IN labels(this0) AND $param2 IN labels(this0)) WITH collect({ node: this0 }) AS edges WITH edges, size(edges) AS totalCount @@ -108,7 +109,8 @@ describe("Cypher -> fulltext -> Additional Labels", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this0, score AS var1 + "CYPHER 5 + CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this0, score AS var1 WHERE ($param1 IN labels(this0) AND $param2 IN labels(this0)) WITH collect({ node: this0 }) AS edges WITH edges, size(edges) AS totalCount diff --git a/packages/graphql/tests/tck/fulltext/score.test.ts b/packages/graphql/tests/tck/fulltext/score.test.ts index bafed19dc6..1f7e3b704b 100644 --- a/packages/graphql/tests/tck/fulltext/score.test.ts +++ b/packages/graphql/tests/tck/fulltext/score.test.ts @@ -57,7 +57,8 @@ describe("Cypher -> fulltext -> Score", () => { const result = await translateQuery(neoSchema, query, {}); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this0, score AS var1 + "CYPHER 5 + CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this0, score AS var1 WHERE $param1 IN labels(this0) WITH collect({ node: this0, score: var1 }) AS edges WITH edges, size(edges) AS totalCount @@ -96,7 +97,8 @@ describe("Cypher -> fulltext -> Score", () => { const result = await translateQuery(neoSchema, query, {}); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this0, score AS var1 + "CYPHER 5 + CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this0, score AS var1 WHERE ($param1 IN labels(this0) AND this0.released > $param2) WITH collect({ node: this0, score: var1 }) AS edges WITH edges, size(edges) AS totalCount @@ -138,7 +140,8 @@ describe("Cypher -> fulltext -> Score", () => { const result = await translateQuery(neoSchema, query, {}); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this0, score AS var1 + "CYPHER 5 + CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this0, score AS var1 WHERE ($param1 IN labels(this0) AND var1 >= $param2) WITH collect({ node: this0, score: var1 }) AS edges WITH edges, size(edges) AS totalCount @@ -177,7 +180,8 @@ describe("Cypher -> fulltext -> Score", () => { const result = await translateQuery(neoSchema, query, {}); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this0, score AS var1 + "CYPHER 5 + CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this0, score AS var1 WHERE $param1 IN labels(this0) WITH collect({ node: this0, score: var1 }) AS edges WITH edges, size(edges) AS totalCount @@ -217,7 +221,8 @@ describe("Cypher -> fulltext -> Score", () => { const result = await translateQuery(neoSchema, query, {}); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this0, score AS var1 + "CYPHER 5 + CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this0, score AS var1 WHERE $param1 IN labels(this0) WITH collect({ node: this0, score: var1 }) AS edges WITH edges, size(edges) AS totalCount @@ -257,7 +262,8 @@ describe("Cypher -> fulltext -> Score", () => { const result = await translateQuery(neoSchema, query, {}); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this0, score AS var1 + "CYPHER 5 + CALL db.index.fulltext.queryNodes(\\"MovieTitle\\", $param0) YIELD node AS this0, score AS var1 WHERE $param1 IN labels(this0) WITH collect({ node: this0, score: var1 }) AS edges WITH edges, size(edges) AS totalCount diff --git a/packages/graphql/tests/tck/global-node.test.ts b/packages/graphql/tests/tck/global-node.test.ts index 635d21223b..544d4f8a80 100644 --- a/packages/graphql/tests/tck/global-node.test.ts +++ b/packages/graphql/tests/tck/global-node.test.ts @@ -57,7 +57,8 @@ describe("Global nodes", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 RETURN this { .title } AS this" `); @@ -94,7 +95,8 @@ describe("Global nodes", () => { variableValues: { id: toGlobalId({ typeName: "Actor", field: "dbId", id: "123455" }) }, }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WHERE this.id = $param0 RETURN this { .name, dbId: this.id } AS this" `); @@ -138,7 +140,8 @@ describe("Global nodes", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WHERE this.id = $param0 RETURN this { .name } AS this" `); @@ -180,7 +183,8 @@ describe("Global nodes", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WHERE this.dbId = $param0 RETURN this { .dbId, .name } AS this" `); diff --git a/packages/graphql/tests/tck/info.test.ts b/packages/graphql/tests/tck/info.test.ts index 686010529d..f3706c3ae3 100644 --- a/packages/graphql/tests/tck/info.test.ts +++ b/packages/graphql/tests/tck/info.test.ts @@ -57,7 +57,8 @@ describe("info", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) diff --git a/packages/graphql/tests/tck/issues/1132.test.ts b/packages/graphql/tests/tck/issues/1132.test.ts index f91bcaf0c8..0194429794 100644 --- a/packages/graphql/tests/tck/issues/1132.test.ts +++ b/packages/graphql/tests/tck/issues/1132.test.ts @@ -65,7 +65,8 @@ describe("https://github.com/neo4j/graphql/issues/1132", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Source) + "CYPHER 5 + MATCH (this:Source) WITH * CALL { WITH this @@ -143,7 +144,8 @@ describe("https://github.com/neo4j/graphql/issues/1132", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Source) + "CYPHER 5 + MATCH (this:Source) WITH this CALL { WITH this diff --git a/packages/graphql/tests/tck/issues/1150.test.ts b/packages/graphql/tests/tck/issues/1150.test.ts index b91f7f0cf3..2337c228e7 100644 --- a/packages/graphql/tests/tck/issues/1150.test.ts +++ b/packages/graphql/tests/tck/issues/1150.test.ts @@ -108,7 +108,8 @@ describe("https://github.com/neo4j/graphql/issues/1150", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Drive) + "CYPHER 5 + MATCH (this:Drive) WHERE this.current = $param0 CALL { WITH this diff --git a/packages/graphql/tests/tck/issues/1249.test.ts b/packages/graphql/tests/tck/issues/1249.test.ts index 3c0ba3704e..c46554fbd4 100644 --- a/packages/graphql/tests/tck/issues/1249.test.ts +++ b/packages/graphql/tests/tck/issues/1249.test.ts @@ -81,7 +81,8 @@ 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) + "CYPHER 5 + MATCH (this:Bulk:BULK) CALL { WITH this MATCH (this)-[this0:MATERIAL_BULK]->(this1:Material) diff --git a/packages/graphql/tests/tck/issues/1320.test.ts b/packages/graphql/tests/tck/issues/1320.test.ts index 05fa1072bc..bfe0f83647 100644 --- a/packages/graphql/tests/tck/issues/1320.test.ts +++ b/packages/graphql/tests/tck/issues/1320.test.ts @@ -66,7 +66,8 @@ describe("https://github.com/neo4j/graphql/issues/1320", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Team) + "CYPHER 5 + MATCH (this:Team) CALL { WITH this MATCH (this)-[this0:OWNS_RISK]->(this1:Risk) diff --git a/packages/graphql/tests/tck/issues/1348.test.ts b/packages/graphql/tests/tck/issues/1348.test.ts index d7e69f78c9..35d393c6c2 100644 --- a/packages/graphql/tests/tck/issues/1348.test.ts +++ b/packages/graphql/tests/tck/issues/1348.test.ts @@ -76,7 +76,8 @@ describe("https://github.com/neo4j/graphql/issues/1348", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:ProgrammeItem) + "CYPHER 5 + MATCH (this:ProgrammeItem) CALL { WITH this CALL { @@ -132,7 +133,8 @@ describe("https://github.com/neo4j/graphql/issues/1348", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:ProgrammeItem) + "CYPHER 5 + MATCH (this:ProgrammeItem) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/issues/1364.test.ts b/packages/graphql/tests/tck/issues/1364.test.ts index c40b9b8233..86568c4803 100644 --- a/packages/graphql/tests/tck/issues/1364.test.ts +++ b/packages/graphql/tests/tck/issues/1364.test.ts @@ -91,7 +91,8 @@ describe("https://github.com/neo4j/graphql/issues/1364", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:Movie) + "CYPHER 5 + MATCH (this0:Movie) WITH collect({ node: this0 }) AS edges WITH edges, size(edges) AS totalCount CALL { @@ -134,7 +135,8 @@ describe("https://github.com/neo4j/graphql/issues/1364", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:Movie) + "CYPHER 5 + MATCH (this0:Movie) WITH collect({ node: this0 }) AS edges WITH edges, size(edges) AS totalCount CALL { @@ -178,7 +180,8 @@ describe("https://github.com/neo4j/graphql/issues/1364", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:Movie) + "CYPHER 5 + MATCH (this0:Movie) WITH collect({ node: this0 }) AS edges WITH edges, size(edges) AS totalCount CALL { diff --git a/packages/graphql/tests/tck/issues/1528.test.ts b/packages/graphql/tests/tck/issues/1528.test.ts index 6c88ffa442..28d847f95a 100644 --- a/packages/graphql/tests/tck/issues/1528.test.ts +++ b/packages/graphql/tests/tck/issues/1528.test.ts @@ -69,7 +69,8 @@ describe("https://github.com/neo4j/graphql/issues/1528", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Genre) + "CYPHER 5 + MATCH (this:Genre) CALL { WITH this MATCH (this)<-[this0:IS_GENRE]-(this1:Movie) diff --git a/packages/graphql/tests/tck/issues/1535.test.ts b/packages/graphql/tests/tck/issues/1535.test.ts index 6f22205d00..c6263f8496 100644 --- a/packages/graphql/tests/tck/issues/1535.test.ts +++ b/packages/graphql/tests/tck/issues/1535.test.ts @@ -78,7 +78,8 @@ describe("https://github.com/neo4j/graphql/issues/1535", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Tenant) + "CYPHER 5 + MATCH (this:Tenant) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/issues/1566.test.ts b/packages/graphql/tests/tck/issues/1566.test.ts index 573b95b388..6ddf24ed21 100644 --- a/packages/graphql/tests/tck/issues/1566.test.ts +++ b/packages/graphql/tests/tck/issues/1566.test.ts @@ -79,7 +79,8 @@ describe("https://github.com/neo4j/graphql/issues/1566", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Community) + "CYPHER 5 + MATCH (this:Community) WHERE this.id = $param0 CALL { WITH this diff --git a/packages/graphql/tests/tck/issues/1628.test.ts b/packages/graphql/tests/tck/issues/1628.test.ts index 92cc2fcd27..8944f31aed 100644 --- a/packages/graphql/tests/tck/issues/1628.test.ts +++ b/packages/graphql/tests/tck/issues/1628.test.ts @@ -59,7 +59,8 @@ describe("https://github.com/neo4j/graphql/issues/1628", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:frbr__Work:Resource) + "CYPHER 5 + MATCH (this:frbr__Work:Resource) WHERE EXISTS { MATCH (this)-[:dcterms__title]->(this0:dcterms_title:property) WHERE this0.value CONTAINS $param0 diff --git a/packages/graphql/tests/tck/issues/1687.test.ts b/packages/graphql/tests/tck/issues/1687.test.ts index 172a174067..56d91e2d19 100644 --- a/packages/graphql/tests/tck/issues/1687.test.ts +++ b/packages/graphql/tests/tck/issues/1687.test.ts @@ -61,7 +61,8 @@ describe("https://github.com/neo4j/graphql/issues/1687", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Genre) + "CYPHER 5 + MATCH (this:Genre) WHERE (EXISTS { MATCH (this)<-[this0:HAS_GENRE]-(this1) WHERE (this1.title = $param0 AND this1:Movie) diff --git a/packages/graphql/tests/tck/issues/1751.test.ts b/packages/graphql/tests/tck/issues/1751.test.ts index 2541b2819a..4c188b3609 100644 --- a/packages/graphql/tests/tck/issues/1751.test.ts +++ b/packages/graphql/tests/tck/issues/1751.test.ts @@ -78,7 +78,8 @@ describe("https://github.com/neo4j/graphql/issues/1751", () => { const result = await translateQuery(neoSchema, query, { variableValues }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Organization) + "CYPHER 5 + MATCH (this:Organization) WHERE this.title = $param0 WITH * CALL { diff --git a/packages/graphql/tests/tck/issues/1779.test.ts b/packages/graphql/tests/tck/issues/1779.test.ts index c287a61dee..7d4906e581 100644 --- a/packages/graphql/tests/tck/issues/1779.test.ts +++ b/packages/graphql/tests/tck/issues/1779.test.ts @@ -58,7 +58,8 @@ describe("https://github.com/neo4j/graphql/issues/1779", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Person) + "CYPHER 5 + MATCH (this:Person) CALL { WITH this MATCH (this)-[this0:attends]->(this1:School) diff --git a/packages/graphql/tests/tck/issues/1783.test.ts b/packages/graphql/tests/tck/issues/1783.test.ts index 6f7132db24..fa9132f8c6 100644 --- a/packages/graphql/tests/tck/issues/1783.test.ts +++ b/packages/graphql/tests/tck/issues/1783.test.ts @@ -126,7 +126,8 @@ describe("https://github.com/neo4j/graphql/issues/1783", () => { const result = await translateQuery(neoSchema, query, { variableValues }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Series) + "CYPHER 5 + MATCH (this:Series) WHERE (this.current = $param0 AND single(this0 IN [(this)-[this3:ARCHITECTURE]->(this0:MasterData) WHERE (EXISTS { MATCH (this0)-[this1:HAS_NAME]->(this2:NameDetails) WHERE (this2.fullName = $param1 AND this1.current = $param2) diff --git a/packages/graphql/tests/tck/issues/1848.test.ts b/packages/graphql/tests/tck/issues/1848.test.ts index 18429b7f4c..4056dcf308 100644 --- a/packages/graphql/tests/tck/issues/1848.test.ts +++ b/packages/graphql/tests/tck/issues/1848.test.ts @@ -86,7 +86,8 @@ describe("https://github.com/neo4j/graphql/issues/1848", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Community:UNIVERSAL) + "CYPHER 5 + MATCH (this:Community:UNIVERSAL) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/issues/190.test.ts b/packages/graphql/tests/tck/issues/190.test.ts index 6351d00472..0d45fd3479 100644 --- a/packages/graphql/tests/tck/issues/190.test.ts +++ b/packages/graphql/tests/tck/issues/190.test.ts @@ -61,7 +61,8 @@ describe("#190", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE EXISTS { MATCH (this)-[:HAS_DEMOGRAPHIC]->(this0:UserDemographics) WHERE (this0.type = $param0 AND this0.value = $param1) @@ -112,7 +113,8 @@ describe("#190", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE EXISTS { MATCH (this)-[:HAS_DEMOGRAPHIC]->(this0:UserDemographics) WHERE ((this0.type = $param0 AND this0.value = $param1) OR this0.type = $param2 OR this0.type = $param3) diff --git a/packages/graphql/tests/tck/issues/1933.test.ts b/packages/graphql/tests/tck/issues/1933.test.ts index 002c2c640c..9b0c041363 100644 --- a/packages/graphql/tests/tck/issues/1933.test.ts +++ b/packages/graphql/tests/tck/issues/1933.test.ts @@ -77,7 +77,8 @@ describe("https://github.com/neo4j/graphql/issues/1933", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Employee) + "CYPHER 5 + MATCH (this:Employee) CALL { WITH this MATCH (this)-[this0:PARTICIPATES]->(this1:Project) diff --git a/packages/graphql/tests/tck/issues/2022.test.ts b/packages/graphql/tests/tck/issues/2022.test.ts index 6a8a8281e0..9053935e59 100644 --- a/packages/graphql/tests/tck/issues/2022.test.ts +++ b/packages/graphql/tests/tck/issues/2022.test.ts @@ -88,7 +88,8 @@ describe("https://github.com/neo4j/graphql/issues/2022", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:ArtPiece) + "CYPHER 5 + MATCH (this0:ArtPiece) WITH collect({ node: this0 }) AS edges WITH edges, size(edges) AS totalCount CALL { diff --git a/packages/graphql/tests/tck/issues/2100.test.ts b/packages/graphql/tests/tck/issues/2100.test.ts index 57a5b37da8..f9632b7f08 100644 --- a/packages/graphql/tests/tck/issues/2100.test.ts +++ b/packages/graphql/tests/tck/issues/2100.test.ts @@ -105,7 +105,8 @@ describe("https://github.com/neo4j/graphql/issues/2100", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Bacenta) + "CYPHER 5 + MATCH (this:Bacenta) WHERE this.id = $param0 CALL { WITH this diff --git a/packages/graphql/tests/tck/issues/2189.test.ts b/packages/graphql/tests/tck/issues/2189.test.ts index bd6e32f600..e4d3d1a59f 100644 --- a/packages/graphql/tests/tck/issues/2189.test.ts +++ b/packages/graphql/tests/tck/issues/2189.test.ts @@ -76,7 +76,8 @@ describe("https://github.com/neo4j/graphql/issues/2189", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Test_Item) @@ -152,7 +153,8 @@ describe("https://github.com/neo4j/graphql/issues/2189", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Test_Item) @@ -246,7 +248,8 @@ describe("https://github.com/neo4j/graphql/issues/2189", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Test_Item) @@ -354,7 +357,8 @@ describe("https://github.com/neo4j/graphql/issues/2189", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Test_Item) diff --git a/packages/graphql/tests/tck/issues/2249.test.ts b/packages/graphql/tests/tck/issues/2249.test.ts index b4dc5b69f6..fa29327dd9 100644 --- a/packages/graphql/tests/tck/issues/2249.test.ts +++ b/packages/graphql/tests/tck/issues/2249.test.ts @@ -85,7 +85,8 @@ describe("https://github.com/neo4j/graphql/issues/2249", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 WITH this CALL { diff --git a/packages/graphql/tests/tck/issues/2262.test.ts b/packages/graphql/tests/tck/issues/2262.test.ts index 420446b732..ecf9ef29b3 100644 --- a/packages/graphql/tests/tck/issues/2262.test.ts +++ b/packages/graphql/tests/tck/issues/2262.test.ts @@ -69,7 +69,8 @@ describe("https://github.com/neo4j/graphql/issues/2262", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Component) + "CYPHER 5 + MATCH (this:Component) WHERE this.uuid = $param0 CALL { WITH this diff --git a/packages/graphql/tests/tck/issues/2267.test.ts b/packages/graphql/tests/tck/issues/2267.test.ts index 91b8cb65e8..65956f8640 100644 --- a/packages/graphql/tests/tck/issues/2267.test.ts +++ b/packages/graphql/tests/tck/issues/2267.test.ts @@ -67,7 +67,8 @@ describe("https://github.com/neo4j/graphql/issues/2267", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Place) + "CYPHER 5 + MATCH (this:Place) WITH * ORDER BY this.displayName ASC CALL { diff --git a/packages/graphql/tests/tck/issues/2396.test.ts b/packages/graphql/tests/tck/issues/2396.test.ts index aa9db71aad..65e02022f2 100644 --- a/packages/graphql/tests/tck/issues/2396.test.ts +++ b/packages/graphql/tests/tck/issues/2396.test.ts @@ -156,7 +156,8 @@ describe("https://github.com/neo4j/graphql/issues/2396", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Mandate) + "CYPHER 5 + MATCH (this:Mandate) WITH * WHERE (EXISTS { MATCH (this)-[:HAS_VALUATION]->(this0:Valuation) @@ -234,7 +235,8 @@ describe("https://github.com/neo4j/graphql/issues/2396", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Mandate) + "CYPHER 5 + MATCH (this:Mandate) WITH * WHERE ((this.price >= $param0 AND EXISTS { MATCH (this)-[:HAS_VALUATION]->(this0:Valuation) @@ -324,7 +326,8 @@ describe("https://github.com/neo4j/graphql/issues/2396", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Mandate) + "CYPHER 5 + MATCH (this:Mandate) WITH * WHERE ((this.price >= $param0 AND EXISTS { MATCH (this)-[:HAS_VALUATION]->(this0:Valuation) @@ -427,7 +430,8 @@ describe("https://github.com/neo4j/graphql/issues/2396", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Mandate) + "CYPHER 5 + MATCH (this:Mandate) WITH * WHERE ((this.price >= $param0 AND EXISTS { MATCH (this)-[:HAS_VALUATION]->(this0:Valuation) @@ -541,7 +545,8 @@ describe("https://github.com/neo4j/graphql/issues/2396", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Mandate) + "CYPHER 5 + MATCH (this:Mandate) WITH * WHERE ((this.price >= $param0 AND EXISTS { MATCH (this)-[:HAS_VALUATION]->(this0:Valuation) diff --git a/packages/graphql/tests/tck/issues/2437.test.ts b/packages/graphql/tests/tck/issues/2437.test.ts index aec21c59d8..ed9dafe4d6 100644 --- a/packages/graphql/tests/tck/issues/2437.test.ts +++ b/packages/graphql/tests/tck/issues/2437.test.ts @@ -81,7 +81,8 @@ describe("https://github.com/neo4j/graphql/issues/2437", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Agent) + "CYPHER 5 + MATCH (this:Agent) WITH * WHERE (this.uuid = $param0 AND ($isAuthenticated = true AND this.archivedAt IS NULL)) CALL { diff --git a/packages/graphql/tests/tck/issues/2581.test.ts b/packages/graphql/tests/tck/issues/2581.test.ts index b2c768c9eb..0ca9150a9b 100644 --- a/packages/graphql/tests/tck/issues/2581.test.ts +++ b/packages/graphql/tests/tck/issues/2581.test.ts @@ -90,7 +90,8 @@ describe("https://github.com/neo4j/graphql/issues/2581", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Author) + "CYPHER 5 + MATCH (this:Author) CALL { WITH this CALL { @@ -134,7 +135,8 @@ describe("https://github.com/neo4j/graphql/issues/2581", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Author) + "CYPHER 5 + 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 6c86299f17..b1a4d36aa4 100644 --- a/packages/graphql/tests/tck/issues/2614.test.ts +++ b/packages/graphql/tests/tck/issues/2614.test.ts @@ -71,7 +71,8 @@ describe("https://github.com/neo4j/graphql/issues/2614", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/issues/2670.test.ts b/packages/graphql/tests/tck/issues/2670.test.ts index 8a6b9b3ac9..ae11391787 100644 --- a/packages/graphql/tests/tck/issues/2670.test.ts +++ b/packages/graphql/tests/tck/issues/2670.test.ts @@ -63,7 +63,8 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[this0:IN_GENRE]->(this1:Genre) @@ -103,7 +104,8 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[this0:IN_GENRE]->(this1:Genre) @@ -143,7 +145,8 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[this0:IN_GENRE]->(this1:Genre) @@ -189,7 +192,8 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[this0:IN_GENRE]->(this1:Genre) @@ -235,7 +239,8 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[this0:IN_GENRE]->(this1:Genre) @@ -278,7 +283,8 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[this0:IN_GENRE]->(this1:Genre) @@ -324,7 +330,8 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[this0:IN_GENRE]->(this1:Genre) @@ -364,7 +371,8 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[this0:IN_GENRE]->(this1:Genre) @@ -404,7 +412,8 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[this0:IN_GENRE]->(this1:Genre) @@ -444,7 +453,8 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[this0:IN_GENRE]->(this1:Genre) @@ -500,7 +510,8 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[this0:IN_GENRE]->(this1:Genre) @@ -551,7 +562,8 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[this0:IN_GENRE]->(this1:Genre) @@ -611,7 +623,8 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[this0:IN_GENRE]->(this1:Genre) @@ -671,7 +684,8 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[this0:IN_GENRE]->(this1:Genre) @@ -725,7 +739,8 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[this0:IN_GENRE]->(this1:Genre) diff --git a/packages/graphql/tests/tck/issues/2708.test.ts b/packages/graphql/tests/tck/issues/2708.test.ts index a6fddb775f..ed774133b8 100644 --- a/packages/graphql/tests/tck/issues/2708.test.ts +++ b/packages/graphql/tests/tck/issues/2708.test.ts @@ -63,7 +63,8 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[:IN_GENRE]->(this0:Genre) @@ -103,7 +104,8 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[:IN_GENRE]->(this0:Genre) @@ -143,7 +145,8 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[:IN_GENRE]->(this0:Genre) @@ -185,7 +188,8 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[:IN_GENRE]->(this0:Genre) @@ -227,7 +231,8 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[:IN_GENRE]->(this0:Genre) @@ -264,7 +269,8 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[:IN_GENRE]->(this0:Genre) @@ -304,7 +310,8 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[:IN_GENRE]->(this0:Genre) @@ -344,7 +351,8 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[:IN_GENRE]->(this0:Genre) @@ -384,7 +392,8 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[:IN_GENRE]->(this0:Genre) @@ -424,7 +433,8 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[:IN_GENRE]->(this0:Genre) @@ -480,7 +490,8 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[:IN_GENRE]->(this0:Genre) @@ -520,7 +531,8 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[:IN_GENRE]->(this0:Genre) @@ -587,7 +599,8 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[:IN_GENRE]->(this0:Genre) @@ -647,7 +660,8 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[:IN_GENRE]->(this0:Genre) @@ -705,7 +719,8 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[:IN_GENRE]->(this0:Genre) @@ -759,7 +774,8 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[:IN_GENRE]->(this0:Genre) @@ -819,7 +835,8 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[:IN_GENRE]->(this0:Genre) @@ -902,7 +919,8 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[:IN_GENRE]->(this0:Genre) diff --git a/packages/graphql/tests/tck/issues/2709.test.ts b/packages/graphql/tests/tck/issues/2709.test.ts index d956766a10..ac4dd5d8f0 100644 --- a/packages/graphql/tests/tck/issues/2709.test.ts +++ b/packages/graphql/tests/tck/issues/2709.test.ts @@ -102,7 +102,8 @@ describe("https://github.com/neo4j/graphql/issues/2709", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Film) + "CYPHER 5 + MATCH (this:Film) WHERE EXISTS { MATCH (this)<-[this0:DISTRIBUTED_BY]-(this1) WHERE (this1.name = $param0 AND (this1:Dishney OR this1:Prime OR this1:Netflix)) @@ -134,7 +135,8 @@ describe("https://github.com/neo4j/graphql/issues/2709", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Film) + "CYPHER 5 + MATCH (this:Film) WHERE EXISTS { MATCH (this)<-[this0:DISTRIBUTED_BY]-(this1) WHERE ((this1.name = $param0 OR this1.name = $param1) AND (this1:Dishney OR this1:Prime OR this1:Netflix)) @@ -232,7 +234,8 @@ describe("https://github.com/neo4j/graphql/issues/2709 union parity", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Film) + "CYPHER 5 + MATCH (this:Film) WHERE EXISTS { MATCH (this)<-[this0:DISTRIBUTED_BY]-(this1:Netflix) WHERE this1.name = $param0 @@ -262,7 +265,8 @@ describe("https://github.com/neo4j/graphql/issues/2709 union parity", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Film) + "CYPHER 5 + MATCH (this:Film) WHERE EXISTS { MATCH (this)<-[this0:DISTRIBUTED_BY]-(this1:Dishney) WHERE this1.name = $param0 @@ -288,7 +292,8 @@ describe("https://github.com/neo4j/graphql/issues/2709 union parity", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Film) + "CYPHER 5 + MATCH (this:Film) WHERE EXISTS { MATCH (this)<-[this0:DISTRIBUTED_BY]-(this1:Dishney) WHERE this1.name = $param0 diff --git a/packages/graphql/tests/tck/issues/2713.test.ts b/packages/graphql/tests/tck/issues/2713.test.ts index e3521e18d8..99ceaf128f 100644 --- a/packages/graphql/tests/tck/issues/2713.test.ts +++ b/packages/graphql/tests/tck/issues/2713.test.ts @@ -63,7 +63,8 @@ describe("https://github.com/neo4j/graphql/issues/2713", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[this0:IN_GENRE]->(this1:Genre) @@ -125,7 +126,8 @@ describe("https://github.com/neo4j/graphql/issues/2713", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[this0:IN_GENRE]->(this1:Genre) @@ -183,7 +185,8 @@ describe("https://github.com/neo4j/graphql/issues/2713", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE (EXISTS { MATCH (this)-[this0:IN_GENRE]->(this1:Genre) WHERE this1.name = $param0 diff --git a/packages/graphql/tests/tck/issues/2766.test.ts b/packages/graphql/tests/tck/issues/2766.test.ts index c96f25d55f..26331bdaa0 100644 --- a/packages/graphql/tests/tck/issues/2766.test.ts +++ b/packages/graphql/tests/tck/issues/2766.test.ts @@ -69,7 +69,8 @@ describe("https://github.com/neo4j/graphql/issues/2766", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/issues/2782.test.ts b/packages/graphql/tests/tck/issues/2782.test.ts index b259221dcd..e66165aa26 100644 --- a/packages/graphql/tests/tck/issues/2782.test.ts +++ b/packages/graphql/tests/tck/issues/2782.test.ts @@ -95,7 +95,8 @@ describe("https://github.com/neo4j/graphql/issues/2782", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Product) + "CYPHER 5 + MATCH (this:Product) SET this.id = $this_update_id_SET SET this.name = $this_update_name_SET WITH this diff --git a/packages/graphql/tests/tck/issues/2789.test.ts b/packages/graphql/tests/tck/issues/2789.test.ts index 6adbc31e70..0efe581218 100644 --- a/packages/graphql/tests/tck/issues/2789.test.ts +++ b/packages/graphql/tests/tck/issues/2789.test.ts @@ -50,7 +50,8 @@ describe("https://github.com/neo4j/graphql/issues/2789", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($param1 IS NOT NULL 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 d7f3c1ae70..ef0cd61e17 100644 --- a/packages/graphql/tests/tck/issues/2803.test.ts +++ b/packages/graphql/tests/tck/issues/2803.test.ts @@ -58,7 +58,8 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this MATCH (this)-[:ACTED_IN]->(this0:Movie) @@ -130,7 +131,8 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this MATCH (this)-[:ACTED_IN]->(this0:Movie) @@ -208,7 +210,8 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[:ACTED_IN]-(this0:Actor) @@ -293,7 +296,8 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[:ACTED_IN]-(this0:Actor) @@ -389,7 +393,8 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this MATCH (this)-[this0:ACTED_IN]->(this1:Movie) @@ -461,7 +466,8 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this MATCH (this)-[:ACTED_IN]->(this0:Movie) @@ -551,7 +557,8 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) @@ -642,7 +649,8 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) @@ -736,7 +744,8 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this MATCH (this)-[:ACTED_IN]->(this0:Movie) @@ -805,7 +814,8 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this MATCH (this)-[this0:ACTED_IN]->(this1:Movie) @@ -884,7 +894,8 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) @@ -949,7 +960,8 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this MATCH (this)-[:ACTED_IN]->(this0:Movie) @@ -1015,7 +1027,8 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this MATCH (this)-[this0:ACTED_IN]->(this1:Movie) @@ -1079,7 +1092,8 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this MATCH (this)-[this0:ACTED_IN]->(this1:Movie) @@ -1134,7 +1148,8 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this MATCH (this)-[:ACTED_IN]->(this0:Movie) @@ -1218,7 +1233,8 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this MATCH (this)-[:ACTED_IN]->(this0:Movie) @@ -1302,7 +1318,8 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this MATCH (this)-[:ACTED_IN]->(this0:Movie) @@ -1393,7 +1410,8 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this MATCH (this)-[this0:ACTED_IN]->(this1:Movie) @@ -1460,7 +1478,8 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this MATCH (this)-[this0:ACTED_IN]->(this1:Movie) diff --git a/packages/graphql/tests/tck/issues/2812.test.ts b/packages/graphql/tests/tck/issues/2812.test.ts index 701e0bb632..d1b59d36f7 100644 --- a/packages/graphql/tests/tck/issues/2812.test.ts +++ b/packages/graphql/tests/tck/issues/2812.test.ts @@ -84,7 +84,8 @@ describe("https://github.com/neo4j/graphql/issues/2812", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) @@ -195,7 +196,8 @@ describe("https://github.com/neo4j/graphql/issues/2812", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) @@ -304,7 +306,8 @@ describe("https://github.com/neo4j/graphql/issues/2812", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) diff --git a/packages/graphql/tests/tck/issues/288.test.ts b/packages/graphql/tests/tck/issues/288.test.ts index 9d2bb0e542..ec982d39c5 100644 --- a/packages/graphql/tests/tck/issues/288.test.ts +++ b/packages/graphql/tests/tck/issues/288.test.ts @@ -57,7 +57,8 @@ describe("#288", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:USER) @@ -96,7 +97,8 @@ describe("#288", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:USER) + "CYPHER 5 + MATCH (this:USER) WHERE this.USERID = $param0 SET this.COMPANYID = $this_update_COMPANYID_SET 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 177e508fa9..9917d51c07 100644 --- a/packages/graphql/tests/tck/issues/2925.test.ts +++ b/packages/graphql/tests/tck/issues/2925.test.ts @@ -55,7 +55,8 @@ describe("https://github.com/neo4j/graphql/issues/2925", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE EXISTS { MATCH (this)-[:HAS_GROUP]->(this0:Group) WHERE this0.name IN $param0 @@ -84,7 +85,8 @@ describe("https://github.com/neo4j/graphql/issues/2925", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Group) + "CYPHER 5 + MATCH (this:Group) WHERE EXISTS { MATCH (this)<-[:HAS_GROUP]-(this0:User) WHERE EXISTS { diff --git a/packages/graphql/tests/tck/issues/3215.test.ts b/packages/graphql/tests/tck/issues/3215.test.ts index bdbf671a94..19dc3c0ce4 100644 --- a/packages/graphql/tests/tck/issues/3215.test.ts +++ b/packages/graphql/tests/tck/issues/3215.test.ts @@ -50,7 +50,8 @@ describe("https://github.com/neo4j/graphql/issues/3215", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WHERE this.age > $param0 RETURN this { .name, .age } AS this" `); @@ -78,7 +79,8 @@ describe("https://github.com/neo4j/graphql/issues/3215", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WHERE this.age > $param0 RETURN this { .name, .age } AS this" `); diff --git a/packages/graphql/tests/tck/issues/3394.test.ts b/packages/graphql/tests/tck/issues/3394.test.ts index 99e4047676..a4aa2c061e 100644 --- a/packages/graphql/tests/tck/issues/3394.test.ts +++ b/packages/graphql/tests/tck/issues/3394.test.ts @@ -55,7 +55,8 @@ describe("https://github.com/neo4j/graphql/issues/3394", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Product) + "CYPHER 5 + MATCH (this:Product) WITH * ORDER BY this.fg_item DESC RETURN this { .description, id: this.fg_item_id, partNumber: this.fg_item } AS this" @@ -80,7 +81,8 @@ describe("https://github.com/neo4j/graphql/issues/3394", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Employee) + "CYPHER 5 + MATCH (this:Employee) CALL { WITH this MATCH (this)-[this0:CAN_ACCESS]->(this1:Product) @@ -113,7 +115,8 @@ describe("https://github.com/neo4j/graphql/issues/3394", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:Product) + "CYPHER 5 + MATCH (this0:Product) WITH collect({ node: this0 }) AS edges WITH edges, size(edges) AS totalCount CALL { @@ -150,7 +153,8 @@ describe("https://github.com/neo4j/graphql/issues/3394", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Employee) + "CYPHER 5 + MATCH (this:Employee) CALL { WITH this MATCH (this)-[this0:CAN_ACCESS]->(this1:Product) diff --git a/packages/graphql/tests/tck/issues/360.test.ts b/packages/graphql/tests/tck/issues/360.test.ts index 8666b3fe29..af588e6967 100644 --- a/packages/graphql/tests/tck/issues/360.test.ts +++ b/packages/graphql/tests/tck/issues/360.test.ts @@ -63,7 +63,8 @@ describe("#360", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Event) + "CYPHER 5 + MATCH (this:Event) WHERE (this.start >= datetime($param0) AND this.start <= datetime($param1)) RETURN this { .activity, start: apoc.date.convertFormat(toString(this.start), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } AS this" `); @@ -99,7 +100,8 @@ describe("#360", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Event) + "CYPHER 5 + MATCH (this:Event) WHERE (this.start >= datetime($param0) OR this.start <= datetime($param1)) RETURN this { .activity, start: apoc.date.convertFormat(toString(this.start), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } AS this" `); diff --git a/packages/graphql/tests/tck/issues/3765.test.ts b/packages/graphql/tests/tck/issues/3765.test.ts index df97a39835..c9cfe7c120 100644 --- a/packages/graphql/tests/tck/issues/3765.test.ts +++ b/packages/graphql/tests/tck/issues/3765.test.ts @@ -66,16 +66,17 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) - CALL { - WITH this - MATCH (this)<-[this0:LIKES]-(this1:User) - RETURN (count(this1) > $param0 AND (count(this1) > $param1 AND count(this1) < $param2)) AS var2 - } - WITH * - WHERE var2 = true - RETURN this { .content } AS this" - `); + "CYPHER 5 + MATCH (this:Post) + CALL { + WITH this + MATCH (this)<-[this0:LIKES]-(this1:User) + RETURN (count(this1) > $param0 AND (count(this1) > $param1 AND count(this1) < $param2)) AS var2 + } + WITH * + WHERE var2 = true + RETURN this { .content } AS this" + `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ @@ -107,7 +108,8 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -155,16 +157,17 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) - CALL { - WITH this - MATCH (this)<-[this0:LIKES]-(this1:User) - RETURN (count(this1) > $param0 AND (count(this1) > $param1 OR count(this1) < $param2)) AS var2 - } - WITH * - WHERE var2 = true - RETURN this { .content } AS this" - `); + "CYPHER 5 + MATCH (this:Post) + CALL { + WITH this + MATCH (this)<-[this0:LIKES]-(this1:User) + RETURN (count(this1) > $param0 AND (count(this1) > $param1 OR count(this1) < $param2)) AS var2 + } + WITH * + WHERE var2 = true + RETURN this { .content } AS this" + `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ @@ -203,7 +206,8 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -242,7 +246,7 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { posts( where: { likesAggregate: { - count: {gt: 10} + count: { gt: 10 } OR: [ { AND: [{ count: { gt: 25 } }, { count: { lte: 99 } }] } { count: { lt: 33 } } @@ -258,16 +262,17 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) - CALL { - WITH this - MATCH (this)<-[this0:LIKES]-(this1:User) - RETURN (count(this1) > $param0 AND ((count(this1) > $param1 AND count(this1) <= $param2) OR count(this1) < $param3)) AS var2 - } - WITH * - WHERE var2 = true - RETURN this { .content } AS this" - `); + "CYPHER 5 + MATCH (this:Post) + CALL { + WITH this + MATCH (this)<-[this0:LIKES]-(this1:User) + RETURN (count(this1) > $param0 AND ((count(this1) > $param1 AND count(this1) <= $param2) OR count(this1) < $param3)) AS var2 + } + WITH * + WHERE var2 = true + RETURN this { .content } AS this" + `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ @@ -317,7 +322,8 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -365,7 +371,8 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -418,7 +425,8 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -471,7 +479,8 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -530,7 +539,8 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) @@ -587,7 +597,8 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) WHERE (this.content = $param0 AND this.alternateContent = $param1) RETURN this { .content } AS this" `); @@ -619,7 +630,8 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) WHERE ((this.content = $param0 AND this.alternateContent = $param1) OR this.content = $param2) RETURN this { .content } AS this" `); @@ -645,7 +657,8 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) WHERE NOT (this.content = $param0 AND this.alternateContent = $param1) RETURN this { .content } AS this" `); @@ -672,7 +685,8 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) WHERE EXISTS { MATCH (this)<-[:LIKES]-(this0:User) WHERE (this0.name = $param0 AND this0.otherName = $param1) @@ -700,7 +714,8 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) WHERE ((EXISTS { MATCH (this)<-[:LIKES]-(this0:User) WHERE this0.otherName = $param0 @@ -742,7 +757,8 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) + "CYPHER 5 + MATCH (this:Post) WHERE (EXISTS { MATCH (this)<-[:LIKES]-(this0:User) WHERE this0.name = $param0 diff --git a/packages/graphql/tests/tck/issues/387.test.ts b/packages/graphql/tests/tck/issues/387.test.ts index f84a5bf38f..d713d0dabf 100644 --- a/packages/graphql/tests/tck/issues/387.test.ts +++ b/packages/graphql/tests/tck/issues/387.test.ts @@ -81,7 +81,8 @@ describe("https://github.com/neo4j/graphql/issues/387", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Place) + "CYPHER 5 + MATCH (this:Place) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/issues/4001.test.ts b/packages/graphql/tests/tck/issues/4001.test.ts index 3553a1ade9..0334f5c241 100644 --- a/packages/graphql/tests/tck/issues/4001.test.ts +++ b/packages/graphql/tests/tck/issues/4001.test.ts @@ -68,7 +68,8 @@ describe("https://github.com/neo4j/graphql/issues/4001", () => { const result = await translateQuery(neoSchema, query, {}); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Serie) + "CYPHER 5 + MATCH (this:Serie) CALL { WITH this CALL { @@ -121,7 +122,8 @@ describe("https://github.com/neo4j/graphql/issues/4001", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Serie) + "CYPHER 5 + MATCH (this:Serie) CALL { WITH this CALL { @@ -167,7 +169,8 @@ describe("https://github.com/neo4j/graphql/issues/4001", () => { const result = await translateQuery(neoSchema, query, {}); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Serie) + "CYPHER 5 + MATCH (this:Serie) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/issues/4004.test.ts b/packages/graphql/tests/tck/issues/4004.test.ts index 9e9dc368b5..5b89c56b8b 100644 --- a/packages/graphql/tests/tck/issues/4004.test.ts +++ b/packages/graphql/tests/tck/issues/4004.test.ts @@ -62,7 +62,8 @@ describe("https://github.com/neo4j/graphql/issues/4004", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Series) + "CYPHER 5 + MATCH (this:Series) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/issues/4007.test.ts b/packages/graphql/tests/tck/issues/4007.test.ts index 783d150139..c1152bda12 100644 --- a/packages/graphql/tests/tck/issues/4007.test.ts +++ b/packages/graphql/tests/tck/issues/4007.test.ts @@ -60,7 +60,8 @@ describe("https://github.com/neo4j/graphql/issues/4007", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) diff --git a/packages/graphql/tests/tck/issues/4015.test.ts b/packages/graphql/tests/tck/issues/4015.test.ts index c9c1b13fb3..f730bed1f4 100644 --- a/packages/graphql/tests/tck/issues/4015.test.ts +++ b/packages/graphql/tests/tck/issues/4015.test.ts @@ -64,7 +64,8 @@ describe("https://github.com/neo4j/graphql/issues/4015", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) diff --git a/packages/graphql/tests/tck/issues/4095.test.ts b/packages/graphql/tests/tck/issues/4095.test.ts index 7018aaa1e4..90eb23c970 100644 --- a/packages/graphql/tests/tck/issues/4095.test.ts +++ b/packages/graphql/tests/tck/issues/4095.test.ts @@ -73,7 +73,8 @@ describe("https://github.com/neo4j/graphql/issues/4095", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Family) + "CYPHER 5 + MATCH (this:Family) CALL { WITH this MATCH (this)<-[this0:MEMBER_OF]-(this1:Person) diff --git a/packages/graphql/tests/tck/issues/4115.test.ts b/packages/graphql/tests/tck/issues/4115.test.ts index e814d5d94e..472bec48a0 100644 --- a/packages/graphql/tests/tck/issues/4115.test.ts +++ b/packages/graphql/tests/tck/issues/4115.test.ts @@ -96,7 +96,8 @@ describe("https://github.com/neo4j/graphql/issues/4115", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Family) + "CYPHER 5 + MATCH (this:Family) CALL { WITH this MATCH (this)<-[this0:MEMBER_OF]-(this1:Person) diff --git a/packages/graphql/tests/tck/issues/4116.test.ts b/packages/graphql/tests/tck/issues/4116.test.ts index f3d819a4e8..8a8e41564d 100644 --- a/packages/graphql/tests/tck/issues/4116.test.ts +++ b/packages/graphql/tests/tck/issues/4116.test.ts @@ -87,7 +87,8 @@ describe("https://github.com/neo4j/graphql/issues/4116", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Family) + "CYPHER 5 + MATCH (this:Family) CALL { WITH this MATCH (this)<-[this0:MEMBER_OF]-(this1:Person) diff --git a/packages/graphql/tests/tck/issues/4170.test.ts b/packages/graphql/tests/tck/issues/4170.test.ts index 3c250ece8a..1ec5d7743b 100644 --- a/packages/graphql/tests/tck/issues/4170.test.ts +++ b/packages/graphql/tests/tck/issues/4170.test.ts @@ -162,7 +162,8 @@ describe("https://github.com/neo4j/graphql/issues/4170", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:Tenant) SET this0.id = randomUUID() WITH * diff --git a/packages/graphql/tests/tck/issues/4214.test.ts b/packages/graphql/tests/tck/issues/4214.test.ts index 2c12b1a224..68de3a006e 100644 --- a/packages/graphql/tests/tck/issues/4214.test.ts +++ b/packages/graphql/tests/tck/issues/4214.test.ts @@ -170,7 +170,8 @@ describe("https://github.com/neo4j/graphql/issues/4214", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:TransactionItem) SET this0.name = $this0_name SET this0.price = $this0_price diff --git a/packages/graphql/tests/tck/issues/4223.test.ts b/packages/graphql/tests/tck/issues/4223.test.ts index 3bc7d628ac..abd24ffc0a 100644 --- a/packages/graphql/tests/tck/issues/4223.test.ts +++ b/packages/graphql/tests/tck/issues/4223.test.ts @@ -190,7 +190,8 @@ describe("https://github.com/neo4j/graphql/issues/4223", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:Tenant) SET this0.id = randomUUID() WITH * diff --git a/packages/graphql/tests/tck/issues/4239.test.ts b/packages/graphql/tests/tck/issues/4239.test.ts index 83b13baf5d..c2d5394cea 100644 --- a/packages/graphql/tests/tck/issues/4239.test.ts +++ b/packages/graphql/tests/tck/issues/4239.test.ts @@ -80,7 +80,8 @@ describe("https://github.com/neo4j/graphql/issues/4239", () => { const result = await translateQuery(neoSchema, query, { token, neo4jVersion: "4.4" }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this)<-[this1:DIRECTED]-(this0:Person) WHERE ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN this { .title } AS this" @@ -135,7 +136,8 @@ describe("https://github.com/neo4j/graphql/issues/4239", () => { const result = await translateQuery(neoSchema, query, { token, neo4jVersion: "4.4" }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { MATCH (this)<-[:DIRECTED]-(this0:Person) @@ -198,7 +200,8 @@ describe("https://github.com/neo4j/graphql/issues/4239", () => { const result = await translateQuery(neoSchema, query, { token, neo4jVersion: "5.0" }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { MATCH (this)<-[this0:DIRECTED]-(this1:Person) diff --git a/packages/graphql/tests/tck/issues/4268.test.ts b/packages/graphql/tests/tck/issues/4268.test.ts index 4c4914022f..c86f5ce16c 100644 --- a/packages/graphql/tests/tck/issues/4268.test.ts +++ b/packages/graphql/tests/tck/issues/4268.test.ts @@ -58,7 +58,8 @@ describe("https://github.com/neo4j/graphql/issues/4268", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (($jwt.roles IS NOT NULL AND $jwt.roles = $param2) OR ($jwt.roles IS NOT NULL AND $jwt.roles = $param3))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN this { .title } AS this" @@ -128,7 +129,8 @@ describe("https://github.com/neo4j/graphql/issues/4268", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ((($jwt.roles IS NOT NULL AND $jwt.roles = $param2) OR ($jwt.roles IS NOT NULL AND $jwt.roles = $param3)) OR (($jwt.roles IS NOT NULL AND $jwt.roles = $param4) OR ($jwt.roles IS NOT NULL AND $jwt.roles = $param5)))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN this { .title } AS this" @@ -193,7 +195,8 @@ describe("https://github.com/neo4j/graphql/issues/4268", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (($jwt.roles IS NOT NULL AND $jwt.roles = $param2) AND ($jwt.roles IS NOT NULL AND $jwt.roles = $param3))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN this { .title } AS this" @@ -263,7 +266,8 @@ describe("https://github.com/neo4j/graphql/issues/4268", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ((($jwt.roles IS NOT NULL AND $jwt.roles = $param2) AND ($jwt.roles IS NOT NULL AND $jwt.roles = $param3)) AND (($jwt.roles IS NOT NULL AND $jwt.roles = $param4) AND ($jwt.roles IS NOT NULL AND $jwt.roles = $param5)))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN this { .title } AS this" @@ -321,7 +325,8 @@ describe("https://github.com/neo4j/graphql/issues/4268", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND NOT ($jwt.roles IS NOT NULL AND $jwt.roles = $param2)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN this { .title } AS this" @@ -378,7 +383,8 @@ describe("https://github.com/neo4j/graphql/issues/4268", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND NOT (NOT ($jwt.roles IS NOT NULL AND $jwt.roles = $param2))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN this { .title } AS this" diff --git a/packages/graphql/tests/tck/issues/4287.test.ts b/packages/graphql/tests/tck/issues/4287.test.ts index ff7e935c99..b03b2d1526 100644 --- a/packages/graphql/tests/tck/issues/4287.test.ts +++ b/packages/graphql/tests/tck/issues/4287.test.ts @@ -67,7 +67,8 @@ describe("https://github.com/neo4j/graphql/issues/4287", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/issues/4292.test.ts b/packages/graphql/tests/tck/issues/4292.test.ts index 99f681850b..d5f07c5f5f 100644 --- a/packages/graphql/tests/tck/issues/4292.test.ts +++ b/packages/graphql/tests/tck/issues/4292.test.ts @@ -210,7 +210,8 @@ describe("https://github.com/neo4j/graphql/issues/4292", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Group) + "CYPHER 5 + MATCH (this:Group) WHERE this.id = $param0 CALL { WITH this diff --git a/packages/graphql/tests/tck/issues/433.test.ts b/packages/graphql/tests/tck/issues/433.test.ts index cbdf133412..f1702cc175 100644 --- a/packages/graphql/tests/tck/issues/433.test.ts +++ b/packages/graphql/tests/tck/issues/433.test.ts @@ -61,7 +61,8 @@ describe("#413", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[this0:ACTED_IN]->(this1:Person) diff --git a/packages/graphql/tests/tck/issues/4405.test.ts b/packages/graphql/tests/tck/issues/4405.test.ts index 5fbea74487..2900df87ce 100644 --- a/packages/graphql/tests/tck/issues/4405.test.ts +++ b/packages/graphql/tests/tck/issues/4405.test.ts @@ -58,7 +58,8 @@ describe("https://github.com/neo4j/graphql/issues/4405", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this)-[this1:ACTED_IN]->(this0:Movie) WHERE ($param1 IS NOT NULL AND this0.title IN $param1) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN this { .name } AS this" @@ -123,7 +124,8 @@ describe("https://github.com/neo4j/graphql/issues/4405", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this)-[this1:ACTED_IN]->(this0:Movie) WHERE (($param1 IS NOT NULL AND this0.title IN $param1) OR ($param2 IS NOT NULL AND this0.title IN $param2)) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN this { .name } AS this" diff --git a/packages/graphql/tests/tck/issues/4432.test.ts b/packages/graphql/tests/tck/issues/4432.test.ts index a53139c0c2..30fec79242 100644 --- a/packages/graphql/tests/tck/issues/4432.test.ts +++ b/packages/graphql/tests/tck/issues/4432.test.ts @@ -69,7 +69,8 @@ describe("https://github.com/neo4j/graphql/issues/4532", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Inventory) + "CYPHER 5 + MATCH (this:Inventory) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/issues/4583.test.ts b/packages/graphql/tests/tck/issues/4583.test.ts index d15702e84b..c00d3b517c 100644 --- a/packages/graphql/tests/tck/issues/4583.test.ts +++ b/packages/graphql/tests/tck/issues/4583.test.ts @@ -88,7 +88,8 @@ describe("https://github.com/neo4j/graphql/issues/4583", () => { const result = await translateQuery(neoSchema, mutation); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:Actor) SET this0.name = $this0_name WITH * @@ -181,7 +182,8 @@ describe("https://github.com/neo4j/graphql/issues/4583", () => { const result = await translateQuery(neoSchema, mutation); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:Actor) SET this0.name = $this0_name WITH * @@ -280,7 +282,8 @@ describe("https://github.com/neo4j/graphql/issues/4583", () => { const result = await translateQuery(neoSchema, mutation); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:Actor) SET this0.name = $this0_name WITH * diff --git a/packages/graphql/tests/tck/issues/4704.test.ts b/packages/graphql/tests/tck/issues/4704.test.ts index 522e7c6b53..250f16da8d 100644 --- a/packages/graphql/tests/tck/issues/4704.test.ts +++ b/packages/graphql/tests/tck/issues/4704.test.ts @@ -84,7 +84,8 @@ describe("https://github.com/neo4j/graphql/issues/4704", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WHERE ((EXISTS { MATCH (this)-[this0:ACTED_IN]->(this1:Movie) WHERE (EXISTS { @@ -171,7 +172,8 @@ describe("https://github.com/neo4j/graphql/issues/4704", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WHERE (single(this1 IN [(this)-[this3:ACTED_IN]->(this1:Movie) WHERE single(this0 IN [(this1)<-[this2:ACTED_IN]-(this0:Actor) WHERE this0.name = $param0 | 1] WHERE true) | 1] WHERE true) XOR single(this5 IN [(this)-[this7:ACTED_IN]->(this5:Series) WHERE single(this4 IN [(this5)<-[this6:STARRED_IN]-(this4:Actor) WHERE this4.name = $param1 | 1] WHERE true) | 1] WHERE true)) CALL { WITH this @@ -220,7 +222,8 @@ describe("https://github.com/neo4j/graphql/issues/4704", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WHERE (NOT (EXISTS { MATCH (this)-[this0:ACTED_IN]->(this1:Movie) WHERE NOT (EXISTS { diff --git a/packages/graphql/tests/tck/issues/4741.test.ts b/packages/graphql/tests/tck/issues/4741.test.ts index dac04401cf..c1cdf6637a 100644 --- a/packages/graphql/tests/tck/issues/4741.test.ts +++ b/packages/graphql/tests/tck/issues/4741.test.ts @@ -61,7 +61,8 @@ describe("https://github.com/neo4j/graphql/issues/4741", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:Opportunity) + "CYPHER 5 + MATCH (this0:Opportunity) CALL { WITH this0 MATCH (this0)-[this1:HAS_LIST]->(this2:ListOli) diff --git a/packages/graphql/tests/tck/issues/4814.test.ts b/packages/graphql/tests/tck/issues/4814.test.ts index e0e55c2e6a..6ad29c61c7 100644 --- a/packages/graphql/tests/tck/issues/4814.test.ts +++ b/packages/graphql/tests/tck/issues/4814.test.ts @@ -71,7 +71,8 @@ describe("https://github.com/neo4j/graphql/issues/4814", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this0:AStep) WHERE this0.id = $param0 CALL { @@ -148,7 +149,8 @@ describe("https://github.com/neo4j/graphql/issues/4814", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this0:AStep) WHERE this0.id = $param0 CALL { @@ -221,7 +223,8 @@ describe("https://github.com/neo4j/graphql/issues/4814", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this0:AStep) WHERE this0.id = $param0 CALL { @@ -292,7 +295,8 @@ describe("https://github.com/neo4j/graphql/issues/4814", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (this0:AStep) WHERE this0.id = $param0 CALL { diff --git a/packages/graphql/tests/tck/issues/4831.test.ts b/packages/graphql/tests/tck/issues/4831.test.ts index e1d17c32d1..507a2283c9 100644 --- a/packages/graphql/tests/tck/issues/4831.test.ts +++ b/packages/graphql/tests/tck/issues/4831.test.ts @@ -51,7 +51,8 @@ describe("https://github.com/neo4j/graphql/issues/4831", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Test) + "CYPHER 5 + MATCH (this:Test) CALL { WITH this CALL { @@ -84,7 +85,8 @@ describe("https://github.com/neo4j/graphql/issues/4831", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Test) + "CYPHER 5 + MATCH (this:Test) CALL { WITH this CALL { @@ -117,7 +119,8 @@ describe("https://github.com/neo4j/graphql/issues/4831", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Test) + "CYPHER 5 + MATCH (this:Test) CALL { WITH this CALL { @@ -146,7 +149,8 @@ describe("https://github.com/neo4j/graphql/issues/4831", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Test) + "CYPHER 5 + MATCH (this:Test) CALL { WITH this CALL { @@ -177,7 +181,8 @@ describe("https://github.com/neo4j/graphql/issues/4831", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Test) + "CYPHER 5 + MATCH (this:Test) CALL { WITH this CALL { @@ -210,7 +215,8 @@ describe("https://github.com/neo4j/graphql/issues/4831", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Test) + "CYPHER 5 + MATCH (this:Test) CALL { WITH this CALL { @@ -243,7 +249,8 @@ describe("https://github.com/neo4j/graphql/issues/4831", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Test) + "CYPHER 5 + MATCH (this:Test) CALL { WITH this CALL { @@ -272,7 +279,8 @@ describe("https://github.com/neo4j/graphql/issues/4831", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Test) + "CYPHER 5 + MATCH (this:Test) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/issues/4838.test.ts b/packages/graphql/tests/tck/issues/4838.test.ts index c29973f46f..cd69e77e44 100644 --- a/packages/graphql/tests/tck/issues/4838.test.ts +++ b/packages/graphql/tests/tck/issues/4838.test.ts @@ -55,7 +55,8 @@ describe("https://github.com/neo4j/graphql/issues/4838", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Test) @@ -99,7 +100,8 @@ describe("https://github.com/neo4j/graphql/issues/4838", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:ParentTest) diff --git a/packages/graphql/tests/tck/issues/487.test.ts b/packages/graphql/tests/tck/issues/487.test.ts index 7cc2b7069f..5fc3033ef9 100644 --- a/packages/graphql/tests/tck/issues/487.test.ts +++ b/packages/graphql/tests/tck/issues/487.test.ts @@ -86,7 +86,8 @@ describe("https://github.com/neo4j/graphql/issues/487", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (node) WHERE \\"Book\\" IN labels(node) OR @@ -197,7 +198,8 @@ describe("https://github.com/neo4j/graphql/issues/487", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (node) WHERE \\"Book\\" IN labels(node) OR diff --git a/packages/graphql/tests/tck/issues/488.test.ts b/packages/graphql/tests/tck/issues/488.test.ts index 0b511a8fb1..411e51e203 100644 --- a/packages/graphql/tests/tck/issues/488.test.ts +++ b/packages/graphql/tests/tck/issues/488.test.ts @@ -72,7 +72,8 @@ describe("https://github.com/neo4j/graphql/issues/488", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Journalist) + "CYPHER 5 + MATCH (this:Journalist) WHERE EXISTS { MATCH (this)-[this0:HAS_KEYWORD]->(this1:Emoji) WHERE this1.type = $param0 @@ -126,7 +127,8 @@ describe("https://github.com/neo4j/graphql/issues/488", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Journalist) + "CYPHER 5 + MATCH (this:Journalist) WHERE NOT (EXISTS { MATCH (this)-[this0:HAS_KEYWORD]->(this1:Emoji) WHERE this1.type = $param0 diff --git a/packages/graphql/tests/tck/issues/5023.test.ts b/packages/graphql/tests/tck/issues/5023.test.ts index a3cc93f876..2d481cd78e 100644 --- a/packages/graphql/tests/tck/issues/5023.test.ts +++ b/packages/graphql/tests/tck/issues/5023.test.ts @@ -139,7 +139,8 @@ describe("https://github.com/neo4j/graphql/issues/5023", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Tenant) + "CYPHER 5 + MATCH (this:Tenant) WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { MATCH (this)<-[:ADMIN_IN]-(this0:User) diff --git a/packages/graphql/tests/tck/issues/5030.test.ts b/packages/graphql/tests/tck/issues/5030.test.ts index 7f5ec388ea..503dea492d 100644 --- a/packages/graphql/tests/tck/issues/5030.test.ts +++ b/packages/graphql/tests/tck/issues/5030.test.ts @@ -62,7 +62,8 @@ describe("https://github.com/neo4j/graphql/issues/5030", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (m:Movie) RETURN m as this } WITH this AS this0 diff --git a/packages/graphql/tests/tck/issues/505.test.ts b/packages/graphql/tests/tck/issues/505.test.ts index bb82a31b02..60bdebb22e 100644 --- a/packages/graphql/tests/tck/issues/505.test.ts +++ b/packages/graphql/tests/tck/issues/505.test.ts @@ -120,7 +120,8 @@ describe("https://github.com/neo4j/graphql/issues/505", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE this.id = $param0 CALL { WITH this @@ -180,7 +181,8 @@ describe("https://github.com/neo4j/graphql/issues/505", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Workspace) + "CYPHER 5 + MATCH (this:Workspace) WITH * WHERE (this.id = $param0 AND ($isAuthenticated = true AND (EXISTS { MATCH (this)<-[:MEMBER_OF]-(this0:User) @@ -244,7 +246,8 @@ describe("https://github.com/neo4j/graphql/issues/505", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Page) + "CYPHER 5 + MATCH (this:Page) WITH * WHERE ((EXISTS { MATCH (this)<-[:HAS_PAGE]-(this0:Workspace) @@ -299,7 +302,8 @@ describe("https://github.com/neo4j/graphql/issues/505", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Page) + "CYPHER 5 + MATCH (this:Page) WITH * WHERE ($isAuthenticated = true AND (EXISTS { MATCH (this)<-[:CREATED_PAGE]-(this0:User) diff --git a/packages/graphql/tests/tck/issues/5080.test.ts b/packages/graphql/tests/tck/issues/5080.test.ts index e53b94e2d0..b8f946db44 100644 --- a/packages/graphql/tests/tck/issues/5080.test.ts +++ b/packages/graphql/tests/tck/issues/5080.test.ts @@ -125,7 +125,8 @@ describe("https://github.com/neo4j/graphql/issues/5080", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH(s:Car) WHERE (s.id = $param0.carId) REMOVE s:Car diff --git a/packages/graphql/tests/tck/issues/5143.test.ts b/packages/graphql/tests/tck/issues/5143.test.ts index 0f24d179ec..ba03514249 100644 --- a/packages/graphql/tests/tck/issues/5143.test.ts +++ b/packages/graphql/tests/tck/issues/5143.test.ts @@ -79,7 +79,8 @@ describe("https://github.com/neo4j/graphql/issues/5143", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MATCH (video:Video) RETURN video LIMIT 1 diff --git a/packages/graphql/tests/tck/issues/5270.test.ts b/packages/graphql/tests/tck/issues/5270.test.ts index eca30db530..a2f6cd436b 100644 --- a/packages/graphql/tests/tck/issues/5270.test.ts +++ b/packages/graphql/tests/tck/issues/5270.test.ts @@ -95,7 +95,8 @@ describe("https://github.com/neo4j/graphql/issues/5270", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { OPTIONAL MATCH (u:User {id: $jwt.sub}) RETURN u } WITH u AS this0 diff --git a/packages/graphql/tests/tck/issues/5467.test.ts b/packages/graphql/tests/tck/issues/5467.test.ts index 8f88e72b40..2edbe822d7 100644 --- a/packages/graphql/tests/tck/issues/5467.test.ts +++ b/packages/graphql/tests/tck/issues/5467.test.ts @@ -66,7 +66,8 @@ describe("https://github.com/neo4j/graphql/issues/5467", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { MERGE (t:Test {name: $param0}) SET t.groups = $param1 return t } diff --git a/packages/graphql/tests/tck/issues/5515.test.ts b/packages/graphql/tests/tck/issues/5515.test.ts index 6f6c9c00c3..65a43faeee 100644 --- a/packages/graphql/tests/tck/issues/5515.test.ts +++ b/packages/graphql/tests/tck/issues/5515.test.ts @@ -86,7 +86,8 @@ describe("https://github.com/neo4j/graphql/issues/5515", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Category) + "CYPHER 5 + MATCH (this:Category) WHERE (this.id = $param0 AND ($isAuthenticated = true AND EXISTS { MATCH (this)<-[:HAS_CATEGORY]-(this0:Cabinet) WHERE EXISTS { diff --git a/packages/graphql/tests/tck/issues/5599.test.ts b/packages/graphql/tests/tck/issues/5599.test.ts index 2fb1ba48de..e1635c602e 100644 --- a/packages/graphql/tests/tck/issues/5599.test.ts +++ b/packages/graphql/tests/tck/issues/5599.test.ts @@ -65,7 +65,8 @@ describe("https://github.com/neo4j/graphql/issues/5599", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH * CALL { WITH * @@ -133,7 +134,8 @@ describe("https://github.com/neo4j/graphql/issues/5599", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH * CALL { WITH * diff --git a/packages/graphql/tests/tck/issues/582.test.ts b/packages/graphql/tests/tck/issues/582.test.ts index 0a04661384..df8e51deff 100644 --- a/packages/graphql/tests/tck/issues/582.test.ts +++ b/packages/graphql/tests/tck/issues/582.test.ts @@ -74,7 +74,8 @@ describe("#582", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Entity) + "CYPHER 5 + MATCH (this:Entity) WHERE (this.type = $param0 AND EXISTS { MATCH (this)-[this0:EDGE]->(this1:Entity) WHERE (this1.type = $param1 AND EXISTS { @@ -133,7 +134,8 @@ describe("#582", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Entity) + "CYPHER 5 + MATCH (this:Entity) WHERE (this.type = $param0 AND EXISTS { MATCH (this)-[this0:EDGE]->(this1:Entity) WHERE (this1.type = $param1 AND EXISTS { diff --git a/packages/graphql/tests/tck/issues/583.test.ts b/packages/graphql/tests/tck/issues/583.test.ts index fae0eee917..bdf767b710 100644 --- a/packages/graphql/tests/tck/issues/583.test.ts +++ b/packages/graphql/tests/tck/issues/583.test.ts @@ -79,7 +79,8 @@ describe("https://github.com/neo4j/graphql/issues/583", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/issues/630.test.ts b/packages/graphql/tests/tck/issues/630.test.ts index 2f3063ba49..3c76c85df6 100644 --- a/packages/graphql/tests/tck/issues/630.test.ts +++ b/packages/graphql/tests/tck/issues/630.test.ts @@ -66,7 +66,8 @@ describe("Cypher directive", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/issues/832.test.ts b/packages/graphql/tests/tck/issues/832.test.ts index 491217a941..352c9df1e7 100644 --- a/packages/graphql/tests/tck/issues/832.test.ts +++ b/packages/graphql/tests/tck/issues/832.test.ts @@ -83,7 +83,8 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:Interaction) SET this0.id = randomUUID() SET this0.kind = $this0_kind @@ -308,7 +309,8 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:Interaction) SET this0.id = randomUUID() SET this0.kind = $this0_kind @@ -438,7 +440,8 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:Interaction) SET this0.id = randomUUID() SET this0.kind = $this0_kind @@ -579,7 +582,8 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:Interaction) SET this0.id = randomUUID() SET this0.kind = $this0_kind @@ -868,7 +872,8 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:Interaction) SET this0.id = randomUUID() SET this0.kind = $this0_kind diff --git a/packages/graphql/tests/tck/issues/847.test.ts b/packages/graphql/tests/tck/issues/847.test.ts index a9bf93b340..a74b242021 100644 --- a/packages/graphql/tests/tck/issues/847.test.ts +++ b/packages/graphql/tests/tck/issues/847.test.ts @@ -66,7 +66,8 @@ describe("https://github.com/neo4j/graphql/issues/847", () => { const result = await translateQuery(neoSchema, query, {}); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Interaction) + "CYPHER 5 + MATCH (this:Interaction) CALL { WITH this CALL { diff --git a/packages/graphql/tests/tck/issues/894.test.ts b/packages/graphql/tests/tck/issues/894.test.ts index 8484525298..63b52bf079 100644 --- a/packages/graphql/tests/tck/issues/894.test.ts +++ b/packages/graphql/tests/tck/issues/894.test.ts @@ -65,7 +65,8 @@ describe("https://github.com/neo4j/graphql/issues/894", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE this.name = $param0 WITH this CALL { diff --git a/packages/graphql/tests/tck/issues/901.test.ts b/packages/graphql/tests/tck/issues/901.test.ts index 777f83b1b3..15850c86b4 100644 --- a/packages/graphql/tests/tck/issues/901.test.ts +++ b/packages/graphql/tests/tck/issues/901.test.ts @@ -93,7 +93,8 @@ describe("https://github.com/neo4j/graphql/issues/901", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Series) + "CYPHER 5 + MATCH (this:Series) WHERE (EXISTS { MATCH (this)-[this0:HAS_MANUFACTURER]->(this1:Series) WHERE (this1.name = $param0 AND this0.current = $param1) diff --git a/packages/graphql/tests/tck/issues/988.test.ts b/packages/graphql/tests/tck/issues/988.test.ts index 0ff5432036..536cebc783 100644 --- a/packages/graphql/tests/tck/issues/988.test.ts +++ b/packages/graphql/tests/tck/issues/988.test.ts @@ -139,7 +139,8 @@ describe("https://github.com/neo4j/graphql/issues/988", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Series) + "CYPHER 5 + MATCH (this:Series) WHERE (this.current = $param0 AND ((EXISTS { MATCH (this)-[this0:MANUFACTURER]->(this1:Manufacturer) WHERE (this1.name = $param1 AND this0.current = $param2) diff --git a/packages/graphql/tests/tck/issues/context-variable-not-always-resolved-on-cypher-queries.test.ts b/packages/graphql/tests/tck/issues/context-variable-not-always-resolved-on-cypher-queries.test.ts index e009cb61bc..09ed603f34 100644 --- a/packages/graphql/tests/tck/issues/context-variable-not-always-resolved-on-cypher-queries.test.ts +++ b/packages/graphql/tests/tck/issues/context-variable-not-always-resolved-on-cypher-queries.test.ts @@ -94,7 +94,8 @@ describe("context-variable-not-always-resolved-on-cypher-queries", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Exprlabel:test:Resource) + "CYPHER 5 + MATCH (this:Exprlabel:test:Resource) WHERE EXISTS { MATCH (this)-[:realizationOf]->(this0:WorkLabel:test:Resource) WHERE EXISTS { @@ -151,7 +152,8 @@ describe("context-variable-not-always-resolved-on-cypher-queries", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Exprlabel:test:Resource) + "CYPHER 5 + MATCH (this:Exprlabel:test:Resource) WHERE EXISTS { MATCH (this)-[:realizationOf]->(this0:WorkLabel:test:Resource) WHERE EXISTS { @@ -224,7 +226,8 @@ describe("context-variable-not-always-resolved-on-cypher-queries", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Exprlabel:test:Resource) + "CYPHER 5 + MATCH (this:Exprlabel:test:Resource) WHERE EXISTS { MATCH (this)-[:realizationOf]->(this0:WorkLabel:test:Resource) WHERE EXISTS { diff --git a/packages/graphql/tests/tck/issues/missing-custom-cypher-on-unions.test.ts b/packages/graphql/tests/tck/issues/missing-custom-cypher-on-unions.test.ts index a19edac239..6c7542cf13 100644 --- a/packages/graphql/tests/tck/issues/missing-custom-cypher-on-unions.test.ts +++ b/packages/graphql/tests/tck/issues/missing-custom-cypher-on-unions.test.ts @@ -152,7 +152,8 @@ describe("Missing custom Cypher on unions", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:HierarchicalComponent:Resource) + "CYPHER 5 + MATCH (this:HierarchicalComponent:Resource) WHERE (this.uri IN $param0 AND EXISTS { MATCH (this)-[:isContained]->(this0:HierarchicalRoot:Resource) WHERE this0.uri = $param1 diff --git a/packages/graphql/tests/tck/math.test.ts b/packages/graphql/tests/tck/math.test.ts index fa1065efd9..286a3d5c36 100644 --- a/packages/graphql/tests/tck/math.test.ts +++ b/packages/graphql/tests/tck/math.test.ts @@ -74,7 +74,8 @@ describe("Math operators", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH this CALL { WITH this @@ -111,7 +112,8 @@ describe("Math operators", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH this CALL { WITH this @@ -147,7 +149,8 @@ describe("Math operators", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WITH this CALL { WITH this @@ -207,7 +210,8 @@ describe("Math operators", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WITH this CALL { WITH this @@ -284,7 +288,8 @@ describe("Math operators", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WITH this CALL { WITH this diff --git a/packages/graphql/tests/tck/nested-unions.test.ts b/packages/graphql/tests/tck/nested-unions.test.ts index 154cf55962..173bb9f3d1 100644 --- a/packages/graphql/tests/tck/nested-unions.test.ts +++ b/packages/graphql/tests/tck/nested-unions.test.ts @@ -92,7 +92,8 @@ describe("Nested Unions", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 WITH * CALL { @@ -211,7 +212,8 @@ describe("Nested Unions", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 WITH this CALL { diff --git a/packages/graphql/tests/tck/null.test.ts b/packages/graphql/tests/tck/null.test.ts index db26927426..c47c79d289 100644 --- a/packages/graphql/tests/tck/null.test.ts +++ b/packages/graphql/tests/tck/null.test.ts @@ -56,7 +56,8 @@ describe("Cypher NULL", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title IS NULL RETURN this { .title } AS this" `); @@ -76,7 +77,8 @@ describe("Cypher NULL", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE NOT (this.title IS NULL) 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 a711738178..42af5fe9c4 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 @@ -82,7 +82,8 @@ describe("Batch Create, Auth", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) @@ -138,7 +139,8 @@ describe("Batch Create, Auth", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) 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 028a86b0fc..70d805f127 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 @@ -77,7 +77,8 @@ describe("Batch Create, Scalar types", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) @@ -153,7 +154,8 @@ describe("Batch Create, Scalar types", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) @@ -268,7 +270,8 @@ describe("Batch Create, Scalar types", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) 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 0a81cb2f4e..6d982fc1fb 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 @@ -79,7 +79,8 @@ describe("Batch Create, Interface", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) @@ -136,7 +137,8 @@ describe("Batch Create, Interface", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:Movie) SET this0.id = $this0_id WITH * @@ -259,7 +261,8 @@ describe("Batch Create, Interface", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:Movie) SET this0.id = $this0_id WITH * 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 6f221193ad..156649dccb 100644 --- a/packages/graphql/tests/tck/operations/batch/batch-create.test.ts +++ b/packages/graphql/tests/tck/operations/batch/batch-create.test.ts @@ -67,7 +67,8 @@ describe("Batch Create", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) @@ -124,7 +125,8 @@ describe("Batch Create", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) @@ -237,7 +239,8 @@ describe("Batch Create", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) @@ -334,7 +337,8 @@ describe("Batch Create", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:Movie) SET this0.id = $this0_id WITH * diff --git a/packages/graphql/tests/tck/operations/connect.test.ts b/packages/graphql/tests/tck/operations/connect.test.ts index 1fbf26b616..ff699330b5 100644 --- a/packages/graphql/tests/tck/operations/connect.test.ts +++ b/packages/graphql/tests/tck/operations/connect.test.ts @@ -106,7 +106,8 @@ describe("Cypher Connect", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:Product) SET this0.id = $this0_id SET this0.name = $this0_name diff --git a/packages/graphql/tests/tck/operations/create.test.ts b/packages/graphql/tests/tck/operations/create.test.ts index d78ff5753b..75c85ab96e 100644 --- a/packages/graphql/tests/tck/operations/create.test.ts +++ b/packages/graphql/tests/tck/operations/create.test.ts @@ -56,7 +56,8 @@ describe("Cypher Create", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) @@ -92,7 +93,8 @@ describe("Cypher Create", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) @@ -136,7 +138,8 @@ describe("Cypher Create", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) @@ -218,7 +221,8 @@ describe("Cypher Create", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) @@ -313,7 +317,8 @@ describe("Cypher Create", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:Movie) SET this0.id = $this0_id WITH * @@ -376,7 +381,8 @@ describe("Cypher Create", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:Actor) SET this0.name = $this0_name WITH * diff --git a/packages/graphql/tests/tck/operations/delete-interface.test.ts b/packages/graphql/tests/tck/operations/delete-interface.test.ts index 4ede68572b..94cd3be65a 100644 --- a/packages/graphql/tests/tck/operations/delete-interface.test.ts +++ b/packages/graphql/tests/tck/operations/delete-interface.test.ts @@ -89,7 +89,8 @@ describe("Cypher Delete - interface", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WHERE this.name = $param0 DETACH DELETE this" `); @@ -116,7 +117,8 @@ describe("Cypher Delete - interface", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WHERE this.name = $param0 WITH * CALL { @@ -169,7 +171,8 @@ describe("Cypher Delete - interface", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WHERE this.name = $param0 WITH * CALL { @@ -226,7 +229,8 @@ describe("Cypher Delete - interface", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WHERE this.name = $param0 WITH * CALL { @@ -286,7 +290,8 @@ describe("Cypher Delete - interface", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WHERE this.name = $param0 WITH * CALL { diff --git a/packages/graphql/tests/tck/operations/delete-union.test.ts b/packages/graphql/tests/tck/operations/delete-union.test.ts index 87df91024a..8fc9db3399 100644 --- a/packages/graphql/tests/tck/operations/delete-union.test.ts +++ b/packages/graphql/tests/tck/operations/delete-union.test.ts @@ -84,7 +84,8 @@ describe("Cypher Delete - union", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WHERE this.name = $param0 DETACH DELETE this" `); @@ -111,7 +112,8 @@ describe("Cypher Delete - union", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WHERE this.name = $param0 WITH * CALL { @@ -159,7 +161,8 @@ describe("Cypher Delete - union", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WHERE this.name = $param0 WITH * CALL { @@ -219,7 +222,8 @@ describe("Cypher Delete - union", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WHERE this.name = $param0 WITH * CALL { @@ -282,7 +286,8 @@ describe("Cypher Delete - union", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WHERE this.name = $param0 WITH * CALL { diff --git a/packages/graphql/tests/tck/operations/delete.test.ts b/packages/graphql/tests/tck/operations/delete.test.ts index b8180c4dc2..86910e1a52 100644 --- a/packages/graphql/tests/tck/operations/delete.test.ts +++ b/packages/graphql/tests/tck/operations/delete.test.ts @@ -55,7 +55,8 @@ describe("Cypher Delete", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.id = $param0 DETACH DELETE this" `); @@ -82,7 +83,8 @@ describe("Cypher Delete", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.id = $param0 WITH * CALL { @@ -128,7 +130,8 @@ describe("Cypher Delete", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.id = $param0 WITH * CALL { @@ -186,7 +189,8 @@ describe("Cypher Delete", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.id = $param0 WITH * CALL { @@ -250,7 +254,8 @@ describe("Cypher Delete", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.id = $param0 WITH * CALL { diff --git a/packages/graphql/tests/tck/operations/disconnect.test.ts b/packages/graphql/tests/tck/operations/disconnect.test.ts index e6be30639d..fd2c557f14 100644 --- a/packages/graphql/tests/tck/operations/disconnect.test.ts +++ b/packages/graphql/tests/tck/operations/disconnect.test.ts @@ -104,7 +104,8 @@ describe("Cypher Disconnect", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Product) + "CYPHER 5 + MATCH (this:Product) SET this.id = $this_update_id_SET SET this.name = $this_update_name_SET WITH this diff --git a/packages/graphql/tests/tck/operations/update.test.ts b/packages/graphql/tests/tck/operations/update.test.ts index 792f828e50..030476b972 100644 --- a/packages/graphql/tests/tck/operations/update.test.ts +++ b/packages/graphql/tests/tck/operations/update.test.ts @@ -61,7 +61,8 @@ describe("Cypher Update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.id = $param0 SET this.id = $this_update_id_SET RETURN collect(DISTINCT this { .id }) AS data" @@ -100,7 +101,8 @@ describe("Cypher Update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.id = $param0 WITH this CALL { @@ -179,7 +181,8 @@ describe("Cypher Update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.id = $param0 WITH this CALL { @@ -267,7 +270,8 @@ describe("Cypher Update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.id = $param0 WITH * CALL { @@ -323,7 +327,8 @@ describe("Cypher Update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.id = $param0 WITH * CALL { @@ -391,7 +396,8 @@ describe("Cypher Update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.id = $param0 WITH this CALL { @@ -463,7 +469,8 @@ describe("Cypher Update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.id = $param0 WITH this CALL { @@ -555,7 +562,8 @@ describe("Cypher Update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WHERE this.name = $param0 WITH this CREATE (this_movies0_create0_node:Movie) @@ -604,7 +612,8 @@ describe("Cypher Update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WHERE this.name = $param0 WITH this CREATE (this_movies0_create0_node:Movie) @@ -660,7 +669,8 @@ describe("Cypher Update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) + "CYPHER 5 + MATCH (this:Actor) WHERE this.name = $param0 WITH this CREATE (this_movies0_create0_node:Movie) @@ -717,7 +727,8 @@ describe("Cypher Update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.id = $param0 WITH * CALL { @@ -799,7 +810,8 @@ describe("Cypher Update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.id = $param0 WITH * CALL { @@ -885,7 +897,8 @@ describe("Cypher Update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.id = $param0 WITH * CALL { @@ -956,7 +969,8 @@ describe("Cypher Update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.id = $param0 WITH * CALL { diff --git a/packages/graphql/tests/tck/pagination.test.ts b/packages/graphql/tests/tck/pagination.test.ts index 74b00c78c9..dee2812f64 100644 --- a/packages/graphql/tests/tck/pagination.test.ts +++ b/packages/graphql/tests/tck/pagination.test.ts @@ -49,7 +49,8 @@ describe("Cypher pagination tests", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH * SKIP $param0 RETURN this { .title } AS this" @@ -77,7 +78,8 @@ describe("Cypher pagination tests", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH * LIMIT $param0 RETURN this { .title } AS this" @@ -105,7 +107,8 @@ describe("Cypher pagination tests", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH * SKIP $param0 LIMIT $param1 @@ -140,7 +143,8 @@ describe("Cypher pagination tests", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH * SKIP $param0 LIMIT $param1 @@ -175,7 +179,8 @@ describe("Cypher pagination tests", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 WITH * SKIP $param1 diff --git a/packages/graphql/tests/tck/pagination/cypher-connection-pagination.test.ts b/packages/graphql/tests/tck/pagination/cypher-connection-pagination.test.ts index f6df0479f9..3afd6e44e9 100644 --- a/packages/graphql/tests/tck/pagination/cypher-connection-pagination.test.ts +++ b/packages/graphql/tests/tck/pagination/cypher-connection-pagination.test.ts @@ -105,7 +105,8 @@ describe("Cypher Connection pagination", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:Movie) + "CYPHER 5 + MATCH (this0:Movie) WITH collect({ node: this0 }) AS edges WITH edges, size(edges) AS totalCount CALL { @@ -149,7 +150,8 @@ describe("Cypher Connection pagination", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:Movie) + "CYPHER 5 + MATCH (this0:Movie) WITH collect({ node: this0 }) AS edges WITH edges, size(edges) AS totalCount CALL { @@ -194,7 +196,8 @@ describe("Cypher Connection pagination", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:Movie) + "CYPHER 5 + MATCH (this0:Movie) WITH collect({ node: this0 }) AS edges WITH edges, size(edges) AS totalCount CALL { @@ -255,7 +258,8 @@ describe("Cypher Connection pagination", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:Movie) + "CYPHER 5 + MATCH (this0:Movie) WHERE this0.title = $param0 WITH collect({ node: this0 }) AS edges WITH edges, size(edges) AS totalCount @@ -319,7 +323,8 @@ describe("Cypher Connection pagination", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:Movie) + "CYPHER 5 + MATCH (this0:Movie) WITH collect({ node: this0 }) AS edges WITH edges, size(edges) AS totalCount CALL { @@ -387,7 +392,8 @@ describe("Cypher Connection pagination", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:Movie) + "CYPHER 5 + MATCH (this0:Movie) WITH collect({ node: this0 }) AS edges WITH edges, size(edges) AS totalCount CALL { diff --git a/packages/graphql/tests/tck/pagination/cypher-pagination.test.ts b/packages/graphql/tests/tck/pagination/cypher-pagination.test.ts index 24a5292498..d41032002b 100644 --- a/packages/graphql/tests/tck/pagination/cypher-pagination.test.ts +++ b/packages/graphql/tests/tck/pagination/cypher-pagination.test.ts @@ -97,7 +97,8 @@ describe("Cypher Sort tests", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -129,7 +130,8 @@ describe("Cypher Sort tests", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -162,7 +164,8 @@ describe("Cypher Sort tests", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -210,7 +213,8 @@ describe("Cypher Sort tests", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this @@ -258,7 +262,8 @@ describe("Cypher Sort tests", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[this0:HAS_GENRE]->(this1:Genre) diff --git a/packages/graphql/tests/tck/pagination/sort.test.ts b/packages/graphql/tests/tck/pagination/sort.test.ts index 3b8cf0e8b7..ce6d5ca1f1 100644 --- a/packages/graphql/tests/tck/pagination/sort.test.ts +++ b/packages/graphql/tests/tck/pagination/sort.test.ts @@ -70,7 +70,8 @@ describe("Sort", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH * ORDER BY this.id ASC RETURN this { .id, .title } AS this" @@ -92,7 +93,8 @@ describe("Sort", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH * ORDER BY this.id DESC RETURN this { .id, .title } AS this" @@ -114,7 +116,8 @@ describe("Sort", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH * ORDER BY this.id DESC RETURN this { .title, .id, aliased: this.id } AS this" @@ -136,7 +139,8 @@ describe("Sort", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH * ORDER BY this.id DESC, this.title ASC RETURN this { .id, .title } AS this" @@ -159,7 +163,8 @@ describe("Sort", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[this0:HAS_GENRE]->(this1:Genre) @@ -188,7 +193,8 @@ describe("Sort", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this MATCH (this)-[this0:HAS_GENRE]->(this1:Genre) diff --git a/packages/graphql/tests/tck/pringles.test.ts b/packages/graphql/tests/tck/pringles.test.ts index 5796159a02..d12b0c2b14 100644 --- a/packages/graphql/tests/tck/pringles.test.ts +++ b/packages/graphql/tests/tck/pringles.test.ts @@ -106,7 +106,8 @@ describe("Cypher Create Pringles", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:Product) SET this0.id = $this0_id SET this0.name = $this0_name @@ -253,7 +254,8 @@ describe("Cypher Create Pringles", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Product) + "CYPHER 5 + MATCH (this:Product) WHERE this.name = $param0 WITH this CALL { diff --git a/packages/graphql/tests/tck/projection.test.ts b/packages/graphql/tests/tck/projection.test.ts index 4cba7243b1..162801eea0 100644 --- a/packages/graphql/tests/tck/projection.test.ts +++ b/packages/graphql/tests/tck/projection.test.ts @@ -87,7 +87,8 @@ describe("Cypher Projection", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Product) diff --git a/packages/graphql/tests/tck/rfcs/query-limits.test.ts b/packages/graphql/tests/tck/rfcs/query-limits.test.ts index 684b291ba1..2b53bb3801 100644 --- a/packages/graphql/tests/tck/rfcs/query-limits.test.ts +++ b/packages/graphql/tests/tck/rfcs/query-limits.test.ts @@ -63,7 +63,8 @@ describe("tck/rfcs/query-limits", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH * LIMIT $param0 RETURN this { .id } AS this" @@ -91,7 +92,8 @@ describe("tck/rfcs/query-limits", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Show) + "CYPHER 5 + MATCH (this:Show) WITH * LIMIT $param0 RETURN this { .id } AS this" @@ -119,7 +121,8 @@ describe("tck/rfcs/query-limits", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Show) + "CYPHER 5 + MATCH (this:Show) WITH * LIMIT $param0 RETURN this { .id } AS this" @@ -152,7 +155,8 @@ describe("tck/rfcs/query-limits", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH * LIMIT $param0 CALL { @@ -199,7 +203,8 @@ describe("tck/rfcs/query-limits", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH * LIMIT $param0 CALL { @@ -253,7 +258,8 @@ describe("tck/rfcs/query-limits", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH * LIMIT $param0 CALL { @@ -307,7 +313,8 @@ describe("tck/rfcs/query-limits", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Festival) + "CYPHER 5 + MATCH (this:Festival) CALL { WITH this MATCH (this)<-[this0:PART_OF]-(this1:Show) @@ -351,7 +358,8 @@ describe("tck/rfcs/query-limits", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH * LIMIT $param0 CALL { diff --git a/packages/graphql/tests/tck/rfcs/rfc-022.test.ts b/packages/graphql/tests/tck/rfcs/rfc-022.test.ts index cb3eafdff5..3db9bd6c8e 100644 --- a/packages/graphql/tests/tck/rfcs/rfc-022.test.ts +++ b/packages/graphql/tests/tck/rfcs/rfc-022.test.ts @@ -66,7 +66,8 @@ describe("tck/rfs/022 subquery projection", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.released = $param0 CALL { WITH this @@ -109,7 +110,8 @@ describe("tck/rfs/022 subquery projection", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.released = $param0 CALL { WITH this @@ -200,7 +202,8 @@ describe("tck/rfs/022 subquery projection", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.released = $param0 CALL { WITH this diff --git a/packages/graphql/tests/tck/root-connection.test.ts b/packages/graphql/tests/tck/root-connection.test.ts index 89c3c68321..1cb287f4ca 100644 --- a/packages/graphql/tests/tck/root-connection.test.ts +++ b/packages/graphql/tests/tck/root-connection.test.ts @@ -60,7 +60,8 @@ describe("Root Connection Query tests", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:Movie) + "CYPHER 5 + MATCH (this0:Movie) WHERE this0.title = $param0 WITH collect({ node: this0 }) AS edges WITH edges, size(edges) AS totalCount @@ -96,7 +97,8 @@ describe("Root Connection Query tests", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:Movie) + "CYPHER 5 + MATCH (this0:Movie) WITH collect({ node: this0 }) AS edges WITH edges, size(edges) AS totalCount CALL { @@ -134,7 +136,8 @@ describe("Root Connection Query tests", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:Movie) + "CYPHER 5 + MATCH (this0:Movie) WHERE this0.title CONTAINS $param0 WITH collect({ node: this0 }) AS edges WITH edges, size(edges) AS totalCount @@ -181,7 +184,8 @@ describe("Root Connection Query tests", () => { `; const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this0:Movie) + "CYPHER 5 + MATCH (this0:Movie) WITH collect({ node: this0 }) AS edges WITH edges, size(edges) AS totalCount CALL { diff --git a/packages/graphql/tests/tck/simple.test.ts b/packages/graphql/tests/tck/simple.test.ts index c9f1f7bbc1..74a45b609b 100644 --- a/packages/graphql/tests/tck/simple.test.ts +++ b/packages/graphql/tests/tck/simple.test.ts @@ -49,7 +49,8 @@ describe("Simple Cypher tests", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 RETURN this { .title } AS this" `); @@ -74,7 +75,8 @@ describe("Simple Cypher tests", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 RETURN this { .id, .title } AS this" `); @@ -101,7 +103,8 @@ describe("Simple Cypher tests", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 RETURN this { .id, .title } AS this" `); diff --git a/packages/graphql/tests/tck/subscriptions/create-auth.test.ts b/packages/graphql/tests/tck/subscriptions/create-auth.test.ts index 18a0a3f8a6..4dd5944521 100644 --- a/packages/graphql/tests/tck/subscriptions/create-auth.test.ts +++ b/packages/graphql/tests/tck/subscriptions/create-auth.test.ts @@ -68,7 +68,8 @@ describe("Subscriptions metadata on create", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Actor) diff --git a/packages/graphql/tests/tck/subscriptions/create.test.ts b/packages/graphql/tests/tck/subscriptions/create.test.ts index b74a41a104..b535c8abf9 100644 --- a/packages/graphql/tests/tck/subscriptions/create.test.ts +++ b/packages/graphql/tests/tck/subscriptions/create.test.ts @@ -101,7 +101,8 @@ describe("Subscriptions metadata on create", () => { ); // TODO: make a test with rel type as union/ interface expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) @@ -205,7 +206,8 @@ describe("Subscriptions metadata on create", () => { ); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) @@ -325,7 +327,8 @@ describe("Subscriptions metadata on create", () => { ); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) @@ -480,7 +483,8 @@ describe("Subscriptions metadata on create", () => { ); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:Movie) SET this0.title = $this0_title WITH * @@ -619,7 +623,8 @@ describe("Subscriptions metadata on create", () => { ); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:Movie) SET this0.title = $this0_title WITH * @@ -705,7 +710,8 @@ describe("Subscriptions metadata on create", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) @@ -741,7 +747,8 @@ describe("Subscriptions metadata on create", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) @@ -783,7 +790,8 @@ describe("Subscriptions metadata on create", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) @@ -855,7 +863,8 @@ describe("Subscriptions metadata on create", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) @@ -963,7 +972,8 @@ describe("Subscriptions metadata on create", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) @@ -1088,7 +1098,8 @@ describe("Subscriptions metadata on create", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) @@ -1183,7 +1194,8 @@ describe("Subscriptions metadata on create", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) diff --git a/packages/graphql/tests/tck/subscriptions/delete.test.ts b/packages/graphql/tests/tck/subscriptions/delete.test.ts index 05463b717e..a1942d5787 100644 --- a/packages/graphql/tests/tck/subscriptions/delete.test.ts +++ b/packages/graphql/tests/tck/subscriptions/delete.test.ts @@ -58,7 +58,8 @@ describe("Subscriptions metadata on delete", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.id = $param0 DETACH DELETE this" `); @@ -85,7 +86,8 @@ describe("Subscriptions metadata on delete", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.id = $param0 WITH * CALL { @@ -135,7 +137,8 @@ describe("Subscriptions metadata on delete", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.id = $param0 WITH * CALL { diff --git a/packages/graphql/tests/tck/subscriptions/update.test.ts b/packages/graphql/tests/tck/subscriptions/update.test.ts index 0c5c6e51ef..1c08fd0fb0 100644 --- a/packages/graphql/tests/tck/subscriptions/update.test.ts +++ b/packages/graphql/tests/tck/subscriptions/update.test.ts @@ -60,7 +60,8 @@ describe("Subscriptions metadata on update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.id = $param0 SET this.id = $this_update_id_SET RETURN collect(DISTINCT this { .id }) AS data" @@ -97,7 +98,8 @@ describe("Subscriptions metadata on update", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.id = $param0 SET this.id = $this_update_id_SET WITH this diff --git a/packages/graphql/tests/tck/types/bigint.test.ts b/packages/graphql/tests/tck/types/bigint.test.ts index 83a2ab7403..49509154a7 100644 --- a/packages/graphql/tests/tck/types/bigint.test.ts +++ b/packages/graphql/tests/tck/types/bigint.test.ts @@ -49,7 +49,8 @@ describe("Cypher BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:File) + "CYPHER 5 + MATCH (this:File) WHERE this.size = $param0 RETURN this { .name } AS this" `); @@ -76,7 +77,8 @@ describe("Cypher BigInt", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:File) + "CYPHER 5 + MATCH (this:File) WHERE this.size = $param0 RETURN this { .name } AS this" `); @@ -105,7 +107,8 @@ describe("Cypher BigInt", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:File) + "CYPHER 5 + 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 7720a88554..0bf19fb98d 100644 --- a/packages/graphql/tests/tck/types/date.test.ts +++ b/packages/graphql/tests/tck/types/date.test.ts @@ -49,7 +49,8 @@ describe("Cypher Date", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.date = $param0 RETURN this { .date } AS this" `); @@ -77,7 +78,8 @@ describe("Cypher Date", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.date >= $param0 RETURN this { .date } AS this" `); @@ -107,7 +109,8 @@ describe("Cypher Date", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) @@ -148,7 +151,8 @@ describe("Cypher Date", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) SET this.date = $this_update_date_SET 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 afb4312e55..9681a10ce5 100644 --- a/packages/graphql/tests/tck/types/datetime.test.ts +++ b/packages/graphql/tests/tck/types/datetime.test.ts @@ -49,7 +49,8 @@ describe("Cypher DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.datetime = datetime($param0) RETURN this { datetime: apoc.date.convertFormat(toString(this.datetime), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } AS this" `); @@ -75,7 +76,8 @@ describe("Cypher DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) @@ -112,7 +114,8 @@ describe("Cypher DateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) SET this.datetime = datetime($this_update_datetime_SET) 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 70b2bd6b62..40437ab06b 100644 --- a/packages/graphql/tests/tck/types/duration.test.ts +++ b/packages/graphql/tests/tck/types/duration.test.ts @@ -49,7 +49,8 @@ describe("Cypher Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.duration = $param0 RETURN this { .duration } AS this" `); @@ -84,7 +85,8 @@ describe("Cypher Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE (datetime() + this.duration) >= (datetime() + $param0) RETURN this { .duration } AS this" `); @@ -121,7 +123,8 @@ describe("Cypher Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) @@ -169,7 +172,8 @@ describe("Cypher Duration", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) SET this.duration = $this_update_duration_SET 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 e1e8b87733..d3c43f1a06 100644 --- a/packages/graphql/tests/tck/types/localdatetime.test.ts +++ b/packages/graphql/tests/tck/types/localdatetime.test.ts @@ -49,7 +49,8 @@ describe("Cypher LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.localDT = $param0 RETURN this { .localDT } AS this" `); @@ -81,7 +82,8 @@ describe("Cypher LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.localDT >= $param0 RETURN this { .localDT } AS this" `); @@ -115,7 +117,8 @@ describe("Cypher LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) @@ -160,7 +163,8 @@ describe("Cypher LocalDateTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) SET this.localDT = $this_update_localDT_SET 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 b50c5a55dc..1e58e52aa5 100644 --- a/packages/graphql/tests/tck/types/localtime.test.ts +++ b/packages/graphql/tests/tck/types/localtime.test.ts @@ -49,7 +49,8 @@ describe("Cypher LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.time = $param0 RETURN this { .time } AS this" `); @@ -78,7 +79,8 @@ describe("Cypher LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.time >= $param0 RETURN this { .time } AS this" `); @@ -109,7 +111,8 @@ describe("Cypher LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) @@ -151,7 +154,8 @@ describe("Cypher LocalTime", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) SET this.time = $this_update_time_SET 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 4591d2760f..1e6393a39e 100644 --- a/packages/graphql/tests/tck/types/point.test.ts +++ b/packages/graphql/tests/tck/types/point.test.ts @@ -53,7 +53,8 @@ describe("Cypher Points", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:PointContainer) + "CYPHER 5 + MATCH (this:PointContainer) WHERE this.point = point($param0) RETURN this { .point } AS this" `); @@ -83,7 +84,8 @@ describe("Cypher Points", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:PointContainer) + "CYPHER 5 + MATCH (this:PointContainer) WHERE NOT (this.point = point($param0)) RETURN this { .point } AS this" `); @@ -114,7 +116,8 @@ describe("Cypher Points", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:PointContainer) + "CYPHER 5 + MATCH (this:PointContainer) WHERE this.point IN [var0 IN $param0 | point(var0)] RETURN this { .point } AS this" `); @@ -149,7 +152,8 @@ describe("Cypher Points", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:PointContainer) + "CYPHER 5 + MATCH (this:PointContainer) WHERE point.distance(this.point, point($param0.point)) < $param0.distance RETURN this { .point } AS this" `); @@ -184,7 +188,8 @@ describe("Cypher Points", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:PointContainer) + "CYPHER 5 + MATCH (this:PointContainer) WHERE point.distance(this.point, point($param0.point)) <= $param0.distance RETURN this { .point } AS this" `); @@ -219,7 +224,8 @@ describe("Cypher Points", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:PointContainer) + "CYPHER 5 + MATCH (this:PointContainer) WHERE point.distance(this.point, point($param0.point)) > $param0.distance RETURN this { .point } AS this" `); @@ -254,7 +260,8 @@ describe("Cypher Points", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:PointContainer) + "CYPHER 5 + MATCH (this:PointContainer) WHERE point.distance(this.point, point($param0.point)) >= $param0.distance RETURN this { .point } AS this" `); @@ -289,7 +296,8 @@ describe("Cypher Points", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:PointContainer) + "CYPHER 5 + MATCH (this:PointContainer) WHERE point.distance(this.point, point($param0.point)) = $param0.distance RETURN this { .point } AS this" `); @@ -326,7 +334,8 @@ describe("Cypher Points", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:PointContainer) @@ -372,7 +381,8 @@ describe("Cypher Points", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:PointContainer) + "CYPHER 5 + MATCH (this:PointContainer) WHERE this.id = $param0 SET this.point = point($this_update_point_SET) RETURN collect(DISTINCT this { .point }) AS data" diff --git a/packages/graphql/tests/tck/types/points.test.ts b/packages/graphql/tests/tck/types/points.test.ts index 021c6790a5..68c56e628c 100644 --- a/packages/graphql/tests/tck/types/points.test.ts +++ b/packages/graphql/tests/tck/types/points.test.ts @@ -53,7 +53,8 @@ describe("Cypher Points", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:PointContainer) + "CYPHER 5 + MATCH (this:PointContainer) WHERE this.points = [var0 IN $param0 | point(var0)] RETURN this { .points } AS this" `); @@ -85,7 +86,8 @@ describe("Cypher Points", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:PointContainer) + "CYPHER 5 + MATCH (this:PointContainer) WHERE NOT (this.points = [var0 IN $param0 | point(var0)]) RETURN this { .points } AS this" `); @@ -118,7 +120,8 @@ describe("Cypher Points", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:PointContainer) + "CYPHER 5 + MATCH (this:PointContainer) WHERE point($param0) IN this.points RETURN this { .points } AS this" `); @@ -151,7 +154,8 @@ describe("Cypher Points", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:PointContainer) @@ -199,7 +203,8 @@ describe("Cypher Points", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:PointContainer) + "CYPHER 5 + MATCH (this:PointContainer) WHERE this.id = $param0 SET this.points = [p in $this_update_points_SET | point(p)] RETURN collect(DISTINCT this { .points }) AS data" diff --git a/packages/graphql/tests/tck/types/time.test.ts b/packages/graphql/tests/tck/types/time.test.ts index 85e58c322b..eb6d9868e3 100644 --- a/packages/graphql/tests/tck/types/time.test.ts +++ b/packages/graphql/tests/tck/types/time.test.ts @@ -49,7 +49,8 @@ describe("Cypher Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.time = time($param0) RETURN this { .time } AS this" `); @@ -73,7 +74,8 @@ describe("Cypher Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.time >= time($param0) RETURN this { .time } AS this" `); @@ -99,7 +101,8 @@ describe("Cypher Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) @@ -136,7 +139,8 @@ describe("Cypher Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) SET this.time = time($this_update_time_SET) RETURN collect(DISTINCT this { .id, .time }) AS data" `); @@ -163,7 +167,8 @@ describe("Cypher Time", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "UNWIND $create_param0 AS create_var0 + "CYPHER 5 + UNWIND $create_param0 AS create_var0 CALL { WITH create_var0 CREATE (create_this1:Movie) 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 687cd87298..f045afcc9f 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 @@ -48,7 +48,8 @@ describe("QueryDirection in relationships aggregations", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) CALL { WITH this MATCH (this)-[this0:FRIENDS_WITH]->(this1:User) @@ -83,7 +84,8 @@ describe("QueryDirection in relationships aggregations", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) CALL { WITH this MATCH (this)-[this0:FRIENDS_WITH]-(this1:User) 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 e150da7195..38dd3daa10 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 @@ -48,7 +48,8 @@ describe("QueryDirection in relationships connection", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) CALL { WITH this MATCH (this)-[this0:FRIENDS_WITH]->(this1:User) @@ -92,7 +93,8 @@ describe("QueryDirection in relationships connection", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) CALL { WITH this MATCH (this)-[this0:FRIENDS_WITH]-(this1:User) 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 fa31929550..ec124c9a0b 100644 --- a/packages/graphql/tests/tck/undirected-relationships/query-direction.test.ts +++ b/packages/graphql/tests/tck/undirected-relationships/query-direction.test.ts @@ -52,7 +52,8 @@ describe("queryDirection in relationships", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) CALL { WITH this MATCH (this)-[this0:FRIENDS_WITH]->(this1:User) @@ -81,7 +82,8 @@ describe("queryDirection in relationships", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE EXISTS { MATCH (this)-[:FRIENDS_WITH]->(this0:User) WHERE this0.name = $param0 @@ -123,7 +125,8 @@ describe("queryDirection in relationships", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE EXISTS { MATCH (this)-[:FRIENDS_WITH]->(this0:User) WHERE this0.name = $param0 @@ -202,7 +205,8 @@ describe("queryDirection in relationships", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE EXISTS { MATCH (this)-[:FRIENDS_WITH]->(this0:User) WHERE this0.name = $param0 @@ -285,7 +289,8 @@ describe("queryDirection in relationships", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE EXISTS { MATCH (this)-[:FRIENDS_WITH]->(this0:User) WHERE this0.name = $param0 @@ -356,7 +361,8 @@ describe("queryDirection in relationships", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE EXISTS { MATCH (this)-[:FRIENDS_WITH]->(this0:User) WHERE this0.name = $param0 @@ -417,7 +423,8 @@ describe("queryDirection in relationships", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) CALL { WITH this MATCH (this)-[this0:FRIENDS_WITH]-(this1:User) @@ -446,7 +453,8 @@ describe("queryDirection in relationships", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE EXISTS { MATCH (this)-[:FRIENDS_WITH]-(this0:User) WHERE this0.name = $param0 @@ -488,7 +496,8 @@ describe("queryDirection in relationships", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE EXISTS { MATCH (this)-[:FRIENDS_WITH]-(this0:User) WHERE this0.name = $param0 @@ -567,7 +576,8 @@ describe("queryDirection in relationships", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE EXISTS { MATCH (this)-[:FRIENDS_WITH]-(this0:User) WHERE this0.name = $param0 @@ -650,7 +660,8 @@ describe("queryDirection in relationships", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE EXISTS { MATCH (this)-[:FRIENDS_WITH]-(this0:User) WHERE this0.name = $param0 @@ -721,7 +732,8 @@ describe("queryDirection in relationships", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) + "CYPHER 5 + MATCH (this:User) WHERE EXISTS { MATCH (this)-[:FRIENDS_WITH]-(this0:User) WHERE this0.name = $param0 diff --git a/packages/graphql/tests/tck/union.test.ts b/packages/graphql/tests/tck/union.test.ts index 4e9565b827..2a651e8a2f 100644 --- a/packages/graphql/tests/tck/union.test.ts +++ b/packages/graphql/tests/tck/union.test.ts @@ -76,7 +76,8 @@ describe("Cypher Union", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -125,7 +126,8 @@ describe("Cypher Union", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) CALL { WITH this CALL { @@ -181,7 +183,8 @@ describe("Cypher Union", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 CALL { WITH this @@ -245,7 +248,8 @@ describe("Cypher Union", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:Movie) SET this0.title = $this0_title WITH * @@ -285,7 +289,8 @@ describe("Cypher Union", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WITH this CREATE (this_search_Genre0_create0_node:Genre) SET this_search_Genre0_create0_node.name = $this_search_Genre0_create0_node_name @@ -323,7 +328,8 @@ describe("Cypher Union", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { + "CYPHER 5 + CALL { CREATE (this0:Movie) SET this0.title = $this0_title WITH * @@ -387,7 +393,8 @@ describe("Cypher Union", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 WITH this CALL { @@ -452,7 +459,8 @@ describe("Cypher Union", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 WITH this CALL { @@ -520,7 +528,8 @@ describe("Cypher Union", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 WITH * CALL { @@ -570,7 +579,8 @@ describe("Cypher Union", () => { const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 WITH * CALL { diff --git a/packages/graphql/tests/tck/where.test.ts b/packages/graphql/tests/tck/where.test.ts index 4e3fd6252d..b04df608f0 100644 --- a/packages/graphql/tests/tck/where.test.ts +++ b/packages/graphql/tests/tck/where.test.ts @@ -58,7 +58,8 @@ describe("Cypher WHERE", () => { }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE (this.title = $param0 AND this.isFavorite = $param1) RETURN this { .title } AS this" `); @@ -83,7 +84,8 @@ describe("Cypher WHERE", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 RETURN this { .title } AS this" `); @@ -107,7 +109,8 @@ describe("Cypher WHERE", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE (this.title = $param0 AND this.isFavorite = $param1) RETURN this { .title } AS this" `); @@ -132,7 +135,8 @@ describe("Cypher WHERE", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 RETURN this { .title } AS this" `); @@ -158,7 +162,8 @@ describe("Cypher WHERE", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE (this.title = $param0 AND this.title = $param1) RETURN this { .title } AS this" `); @@ -187,7 +192,8 @@ describe("Cypher WHERE", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE (this.id = $param0 AND (this.title = $param1 OR this.isFavorite = $param2)) RETURN this { .title } AS this" `); @@ -213,7 +219,8 @@ describe("Cypher WHERE", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 RETURN this { .title } AS this" `); @@ -237,7 +244,8 @@ describe("Cypher WHERE", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 RETURN this { .title } AS this" `); @@ -261,7 +269,8 @@ describe("Cypher WHERE", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 RETURN this { .title } AS this" `); @@ -285,7 +294,8 @@ describe("Cypher WHERE", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title = $param0 RETURN this { .title } AS this" `); @@ -310,7 +320,8 @@ describe("Cypher WHERE", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE this.title IS NULL RETURN this { .title } AS this" `); @@ -330,7 +341,8 @@ describe("Cypher WHERE", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE NOT (this.title IS NULL) RETURN this { .title } AS this" `); @@ -351,7 +363,8 @@ describe("Cypher WHERE", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE NOT (this.title = $param0) RETURN this { .title } AS this" `); @@ -375,7 +388,8 @@ describe("Cypher WHERE", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) + "CYPHER 5 + MATCH (this:Movie) WHERE NOT (this.title = $param0 AND this.isFavorite = $param1) RETURN this { .title } AS this" `); diff --git a/packages/graphql/tests/utils/builders/driver-builder.ts b/packages/graphql/tests/utils/builders/driver-builder.ts index 097360dfa3..95945c726e 100644 --- a/packages/graphql/tests/utils/builders/driver-builder.ts +++ b/packages/graphql/tests/utils/builders/driver-builder.ts @@ -88,9 +88,9 @@ export class DriverBuilder extends Builder> { const calls: Array = []; function mockFunc(...params) { // this is needed as the first query could be the DB version check query - if (params?.[0] === DBMS_COMPONENTS_QUERY) { + if (params?.[0].includes(DBMS_COMPONENTS_QUERY)) { return { - records: [new Record(["version", "edition"], ["4.0.0", "enterprise"])], + records: [new Record(["version", "edition"], ["5.0.0", "enterprise"])], summary: { counters: { updates() {