From 5c503a2bb494b0ad3cbce374e37bd3ff46415ead Mon Sep 17 00:00:00 2001 From: Darrell Warde Date: Mon, 11 Nov 2024 15:35:36 +0000 Subject: [PATCH 1/6] Remove deprecated `directed` argument --- packages/graphql/src/constants.ts | 4 - .../enums/RelationshipQueryDirection.ts | 14 - .../src/graphql/directives/relationship.ts | 4 +- .../src/schema-model/generate-model.test.ts | 4 +- .../schema-model/relationship/Relationship.ts | 4 +- .../RelationshipAdapter.test.ts | 2 +- .../model-adapters/RelationshipAdapter.ts | 2 +- .../create-relationship-fields.ts | 5 +- .../src/schema/directed-argument.test.ts | 157 --- .../graphql/src/schema/directed-argument.ts | 74 -- .../generation/augment-object-or-interface.ts | 35 +- .../src/schema/get-relationship-meta.test.ts | 8 +- .../query-direction-deprecated-values.ts | 64 -- .../validation/validate-document.test.ts | 64 -- .../schema/validation/validate-document.ts | 2 - .../create-connect-and-params.test.ts | 2 +- .../create-disconnect-and-params.test.ts | 2 +- packages/graphql/src/types/index.ts | 1 - .../src/utils/get-relationship-direction.ts | 6 +- ...y-direction-deprecated-options.int.test.ts | 234 +---- .../tests/integration/issues/1348.int.test.ts | 6 +- .../tests/integration/issues/4292.int.test.ts | 2 +- .../undirected-relationships.test.ts | 125 --- .../graphql/tests/schema/aggregations.test.ts | 6 +- .../tests/schema/array-methods.test.ts | 12 +- .../tests/schema/authorization.test.ts | 12 +- .../graphql/tests/schema/comments.test.ts | 16 +- .../tests/schema/connections/enums.test.ts | 12 +- .../schema/connections/interfaces.test.ts | 18 +- .../tests/schema/connections/sort.test.ts | 12 +- .../tests/schema/connections/unions.test.ts | 16 +- .../tests/schema/directive-preserve.test.ts | 76 +- .../tests/schema/directives/alias.test.ts | 6 +- .../schema/directives/filterable.test.ts | 168 ++-- .../schema/directives/populatedBy.test.ts | 12 +- .../directives/relationship-aggregate.test.ts | 28 +- .../relationship-nested-operations.test.ts | 180 ++-- .../relationship-properties.test.ts | 36 +- .../schema/directives/relationship.test.ts | 18 +- .../schema/directives/selectable.test.ts | 20 +- .../tests/schema/directives/settable.test.ts | 112 +-- .../graphql/tests/schema/federation.test.ts | 14 +- .../graphql/tests/schema/inheritance.test.ts | 6 +- .../schema/interface-relationships.test.ts | 168 ++-- .../graphql/tests/schema/interfaces.test.ts | 12 +- .../graphql/tests/schema/issues/1182.test.ts | 6 +- .../graphql/tests/schema/issues/1614.test.ts | 6 +- .../graphql/tests/schema/issues/162.test.ts | 12 +- .../graphql/tests/schema/issues/2187.test.ts | 12 +- .../graphql/tests/schema/issues/2377.test.ts | 6 +- .../graphql/tests/schema/issues/2969.test.ts | 12 +- .../graphql/tests/schema/issues/2981.test.ts | 16 +- .../graphql/tests/schema/issues/2993.test.ts | 6 +- .../graphql/tests/schema/issues/3428.test.ts | 10 +- .../graphql/tests/schema/issues/3439.test.ts | 74 +- .../graphql/tests/schema/issues/3541.test.ts | 12 +- .../graphql/tests/schema/issues/3698.test.ts | 42 +- .../graphql/tests/schema/issues/3816.test.ts | 24 +- .../graphql/tests/schema/issues/3817.test.ts | 7 +- .../graphql/tests/schema/issues/4511.test.ts | 18 +- .../graphql/tests/schema/issues/4615.test.ts | 18 +- .../graphql/tests/schema/issues/872.test.ts | 12 +- .../tests/schema/lowercase-type-names.test.ts | 12 +- packages/graphql/tests/schema/math.test.ts | 36 +- .../schema/nested-aggregation-on-type.test.ts | 6 +- .../schema/pluralize-consistency.test.ts | 6 +- .../remove-deprecated/array-methods.test.ts | 12 +- .../schema/remove-deprecated/comments.test.ts | 16 +- .../directed-argument.test.ts | 835 ---------------- .../implicit-equality.test.ts | 12 +- .../options-argument.test.ts | 12 +- .../remove-deprecated/query-direction.test.ts | 899 ------------------ .../tests/schema/string-comparators.test.ts | 12 +- .../tests/schema/subscriptions.test.ts | 92 +- .../union-interface-relationship.test.ts | 28 +- packages/graphql/tests/schema/unions.test.ts | 4 +- .../query-direction-aggregations.test.ts | 132 --- .../query-direction-connection.test.ts | 161 ---- .../tck/deprecated/query-direction.test.ts | 197 ---- .../graphql/tests/tck/issues/1348.test.ts | 9 +- .../graphql/tests/tck/issues/4292.test.ts | 2 +- .../undirected-aggregations.test.ts | 62 -- .../undirected-connection.test.ts | 70 -- .../undirected-relationships.test.ts | 258 ----- 84 files changed, 788 insertions(+), 4159 deletions(-) delete mode 100644 packages/graphql/src/schema/directed-argument.test.ts delete mode 100644 packages/graphql/src/schema/directed-argument.ts delete mode 100644 packages/graphql/src/schema/validation/custom-rules/warnings/query-direction-deprecated-values.ts delete mode 100644 packages/graphql/tests/integration/undirected-relationships.test.ts delete mode 100644 packages/graphql/tests/schema/remove-deprecated/directed-argument.test.ts delete mode 100644 packages/graphql/tests/schema/remove-deprecated/query-direction.test.ts delete mode 100644 packages/graphql/tests/tck/deprecated/query-direction-aggregations.test.ts delete mode 100644 packages/graphql/tests/tck/deprecated/query-direction-connection.test.ts delete mode 100644 packages/graphql/tests/tck/deprecated/query-direction.test.ts delete mode 100644 packages/graphql/tests/tck/undirected-relationships/undirected-aggregations.test.ts delete mode 100644 packages/graphql/tests/tck/undirected-relationships/undirected-connection.test.ts delete mode 100644 packages/graphql/tests/tck/undirected-relationships/undirected-relationships.test.ts diff --git a/packages/graphql/src/constants.ts b/packages/graphql/src/constants.ts index 2e073d45a9..1d05168889 100644 --- a/packages/graphql/src/constants.ts +++ b/packages/graphql/src/constants.ts @@ -73,10 +73,6 @@ export const LOGICAL_OPERATORS = ["AND", "OR", "NOT"] as const; export const AGGREGATION_COMPARISON_OPERATORS = ["EQUAL", "GT", "GTE", "LT", "LTE"] as const; export enum RelationshipQueryDirectionOption { - DEFAULT_DIRECTED = "DEFAULT_DIRECTED", - DEFAULT_UNDIRECTED = "DEFAULT_UNDIRECTED", - DIRECTED_ONLY = "DIRECTED_ONLY", - UNDIRECTED_ONLY = "UNDIRECTED_ONLY", DIRECTED = "DIRECTED", UNDIRECTED = "UNDIRECTED", } diff --git a/packages/graphql/src/graphql/directives/arguments/enums/RelationshipQueryDirection.ts b/packages/graphql/src/graphql/directives/arguments/enums/RelationshipQueryDirection.ts index 4313a24870..b4c576b731 100644 --- a/packages/graphql/src/graphql/directives/arguments/enums/RelationshipQueryDirection.ts +++ b/packages/graphql/src/graphql/directives/arguments/enums/RelationshipQueryDirection.ts @@ -23,20 +23,6 @@ import { RelationshipQueryDirectionOption } from "../../../../constants"; export const RelationshipQueryDirectionEnum = new GraphQLEnumType({ name: "RelationshipQueryDirection", values: { - [RelationshipQueryDirectionOption.DEFAULT_DIRECTED]: { - deprecationReason: - "DEFAULT_DIRECTED is deprecated without alternative and it will be removed in future versions, this is following the deprecation of the generated `directed` argument", - }, - [RelationshipQueryDirectionOption.DEFAULT_UNDIRECTED]: { - deprecationReason: - "DEFAULT_UNDIRECTED is deprecated without alternative and it will be removed in future versions, this is following the deprecation of the generated `directed` argument", - }, - [RelationshipQueryDirectionOption.DIRECTED_ONLY]: { - deprecationReason: "DIRECTED_ONLY is deprecated, please use DIRECTED.", - }, - [RelationshipQueryDirectionOption.UNDIRECTED_ONLY]: { - deprecationReason: "UNDIRECTED_ONLY is deprecated, please use UNDIRECTED.", - }, [RelationshipQueryDirectionOption.DIRECTED]: {}, [RelationshipQueryDirectionOption.UNDIRECTED]: {}, }, diff --git a/packages/graphql/src/graphql/directives/relationship.ts b/packages/graphql/src/graphql/directives/relationship.ts index b23a371a2a..17b70c9e6c 100644 --- a/packages/graphql/src/graphql/directives/relationship.ts +++ b/packages/graphql/src/graphql/directives/relationship.ts @@ -50,8 +50,8 @@ export const relationshipDirective = new GraphQLDirective({ }, queryDirection: { type: RelationshipQueryDirectionEnum, - defaultValue: RelationshipQueryDirectionOption.DEFAULT_DIRECTED, - description: "Valid and default directions for this relationship.", + defaultValue: RelationshipQueryDirectionOption.DIRECTED, + description: "Directions to query this relationship.", }, direction: { type: new GraphQLNonNull(RelationshipDirectionEnum), diff --git a/packages/graphql/src/schema-model/generate-model.test.ts b/packages/graphql/src/schema-model/generate-model.test.ts index 4b7b6e41f2..5139255160 100644 --- a/packages/graphql/src/schema-model/generate-model.test.ts +++ b/packages/graphql/src/schema-model/generate-model.test.ts @@ -393,7 +393,7 @@ describe("Relationship", () => { expect(accounts).toBeDefined(); expect(accounts?.type).toBe("HAS_ACCOUNT"); expect(accounts?.direction).toBe("OUT"); - expect(accounts?.queryDirection).toBe("DEFAULT_DIRECTED"); + expect(accounts?.queryDirection).toBe("DIRECTED"); expect(accounts?.nestedOperations).toEqual([ "CREATE", "UPDATE", @@ -427,7 +427,7 @@ describe("Relationship", () => { expect(actors).toBeDefined(); expect(actors?.type).toBe("STARED_IN"); expect(actors?.direction).toBe("OUT"); - expect(actors?.queryDirection).toBe("DEFAULT_DIRECTED"); + expect(actors?.queryDirection).toBe("DIRECTED"); expect(actors?.nestedOperations).toEqual([ "CREATE", "UPDATE", diff --git a/packages/graphql/src/schema-model/relationship/Relationship.ts b/packages/graphql/src/schema-model/relationship/Relationship.ts index b2144b4c49..08dabb99b3 100644 --- a/packages/graphql/src/schema-model/relationship/Relationship.ts +++ b/packages/graphql/src/schema-model/relationship/Relationship.ts @@ -26,10 +26,10 @@ import type { Attribute } from "../attribute/Attribute"; import type { Entity } from "../entity/Entity"; export type RelationshipDirection = "IN" | "OUT"; +// "DIRECTED" | "UNDIRECTED"; export type QueryDirection = keyof typeof RelationshipQueryDirectionOption; -// "DEFAULT_DIRECTED" | "DEFAULT_UNDIRECTED" | "DIRECTED_ONLY" | "UNDIRECTED_ONLY" | "DIRECTED" | "UNDIRECTED"; -export type NestedOperation = keyof typeof RelationshipNestedOperationsOption; // "CREATE" | "UPDATE" | "DELETE" | "CONNECT" | "DISCONNECT" | "CONNECT_OR_CREATE"; +export type NestedOperation = keyof typeof RelationshipNestedOperationsOption; export class Relationship { public readonly name: string; // name of the relationship field, e.g. friends diff --git a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.test.ts b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.test.ts index db5f506743..2dd2051af6 100644 --- a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.test.ts +++ b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.test.ts @@ -88,7 +88,7 @@ describe("RelationshipAdapter", () => { direction: "OUT", isList: Boolean(false), attributes: [accountAlias], - queryDirection: "DEFAULT_DIRECTED", + queryDirection: "DIRECTED", nestedOperations: ["CREATE", "UPDATE", "DELETE", "CONNECT", "DISCONNECT", "CONNECT_OR_CREATE"], aggregate: false, description: "", diff --git a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts index c15c028ac8..ed5d07cd21 100644 --- a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts +++ b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts @@ -157,7 +157,7 @@ export class RelationshipAdapter { * @returns the direction to use in the CypherBuilder **/ public getCypherDirection(directed?: boolean): "left" | "right" | "undirected" { - if (directed === false || this.queryDirection === "UNDIRECTED_ONLY" || this.queryDirection === "UNDIRECTED") { + if (directed === false || this.queryDirection === "UNDIRECTED") { return "undirected"; } return this.cypherDirectionFromRelDirection(); diff --git a/packages/graphql/src/schema/create-relationship-fields/create-relationship-fields.ts b/packages/graphql/src/schema/create-relationship-fields/create-relationship-fields.ts index c32adb6ebc..6c42b0ba78 100644 --- a/packages/graphql/src/schema/create-relationship-fields/create-relationship-fields.ts +++ b/packages/graphql/src/schema/create-relationship-fields/create-relationship-fields.ts @@ -29,7 +29,6 @@ import { RelationshipAdapter } from "../../schema-model/relationship/model-adapt import { RelationshipDeclarationAdapter } from "../../schema-model/relationship/model-adapters/RelationshipDeclarationAdapter"; import type { Neo4jFeaturesSettings } from "../../types"; import { FieldAggregationComposer } from "../aggregations/field-aggregation-composer"; -import { addDirectedArgument } from "../directed-argument"; import { augmentObjectOrInterfaceTypeWithConnectionField, augmentObjectOrInterfaceTypeWithRelationshipField, @@ -264,13 +263,11 @@ export function createRelationshipFields({ where: relationshipTarget.operations.whereInputTypeName, }; - const aggregationFieldsArgs = addDirectedArgument(aggregationFieldsBaseArgs, relationshipAdapter, features); - if (relationshipAdapter.aggregate) { composeNode.addFields({ [relationshipAdapter.operations.aggregateTypeName]: { type: aggregationTypeObject, - args: aggregationFieldsArgs, + args: aggregationFieldsBaseArgs, directives: deprecatedDirectives, }, }); diff --git a/packages/graphql/src/schema/directed-argument.test.ts b/packages/graphql/src/schema/directed-argument.test.ts deleted file mode 100644 index 6f43f513bc..0000000000 --- a/packages/graphql/src/schema/directed-argument.test.ts +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { RelationshipQueryDirectionOption } from "../constants"; -import type { RelationshipAdapter } from "../schema-model/relationship/model-adapters/RelationshipAdapter"; -import { DEPRECATE_DIRECTED_ARGUMENT } from "./constants"; -import { addDirectedArgument, getDirectedArgument } from "./directed-argument"; - -describe("Directed argument", () => { - describe("getDirectedArgument", () => { - test("should return default true argument for DEFAULT_DIRECTED (deprecated)", () => { - expect( - getDirectedArgument( - { - queryDirection: RelationshipQueryDirectionOption.DEFAULT_DIRECTED, - } as RelationshipAdapter, - {} - ) - ).toEqual({ - type: "Boolean", - defaultValue: true, - directives: [DEPRECATE_DIRECTED_ARGUMENT], - }); - }); - - test("should return default false argument for DEFAULT_UNDIRECTED (deprecated)", () => { - expect( - getDirectedArgument( - { - queryDirection: RelationshipQueryDirectionOption.DEFAULT_UNDIRECTED, - } as RelationshipAdapter, - {} - ) - ).toEqual({ - type: "Boolean", - defaultValue: false, - directives: [DEPRECATE_DIRECTED_ARGUMENT], - }); - }); - - test("should return an undefined argument for DIRECTED_ONLY (deprecated)", () => { - expect( - getDirectedArgument( - { - queryDirection: RelationshipQueryDirectionOption.DIRECTED_ONLY, - } as RelationshipAdapter, - {} - ) - ).toBeUndefined(); - }); - - test("should return an undefined argument for UNDIRECTED_ONLY (deprecated)", () => { - expect( - getDirectedArgument( - { - queryDirection: RelationshipQueryDirectionOption.UNDIRECTED_ONLY, - } as RelationshipAdapter, - {} - ) - ).toBeUndefined(); - }); - - test("should return an undefined argument for DIRECTED", () => { - expect( - getDirectedArgument( - { - queryDirection: RelationshipQueryDirectionOption.DIRECTED, - } as RelationshipAdapter, - {} - ) - ).toBeUndefined(); - }); - - test("should return an undefined argument for UNDIRECTED", () => { - expect( - getDirectedArgument( - { - queryDirection: RelationshipQueryDirectionOption.UNDIRECTED, - } as RelationshipAdapter, - {} - ) - ).toBeUndefined(); - }); - - test("should return undefined if directedArgument in excludeDeprecatedDirectives", () => { - expect( - getDirectedArgument( - { - queryDirection: RelationshipQueryDirectionOption.DEFAULT_UNDIRECTED, - } as RelationshipAdapter, - { excludeDeprecatedFields: { directedArgument: true } } - ) - ).toBeUndefined(); - }); - }); - - describe("addDirectedArgument", () => { - test("should add directed argument if DEFAULT_DIRECTED", () => { - const args = addDirectedArgument( - { arg1: "dsa" }, - { - queryDirection: RelationshipQueryDirectionOption.DEFAULT_DIRECTED, - } as RelationshipAdapter, - {} - ); - expect(args).toEqual({ - arg1: "dsa", - directed: { - type: "Boolean", - defaultValue: true, - directives: [DEPRECATE_DIRECTED_ARGUMENT], - }, - }); - }); - test("should not add any argument if DIRECTED_ONLY", () => { - const args = addDirectedArgument( - { arg1: "dsa" }, - { - queryDirection: RelationshipQueryDirectionOption.DIRECTED_ONLY, - } as RelationshipAdapter, - {} - ); - expect(args).toEqual({ - arg1: "dsa", - }); - }); - - test("should not add any argument if DIRECTED", () => { - const args = addDirectedArgument( - { arg1: "dsa" }, - { - queryDirection: RelationshipQueryDirectionOption.DIRECTED, - } as RelationshipAdapter, - {} - ); - expect(args).toEqual({ - arg1: "dsa", - }); - }); - }); -}); diff --git a/packages/graphql/src/schema/directed-argument.ts b/packages/graphql/src/schema/directed-argument.ts deleted file mode 100644 index b0bbfe8473..0000000000 --- a/packages/graphql/src/schema/directed-argument.ts +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import type { Directive } from "graphql-compose"; -import { RelationshipQueryDirectionOption } from "../constants"; -import type { RelationshipAdapter } from "../schema-model/relationship/model-adapters/RelationshipAdapter"; -import { RelationshipDeclarationAdapter } from "../schema-model/relationship/model-adapters/RelationshipDeclarationAdapter"; -import type { Neo4jFeaturesSettings } from "../types"; -import { DEPRECATE_DIRECTED_ARGUMENT } from "./constants"; -import { shouldAddDeprecatedFields } from "./generation/utils"; - -type DirectedArgument = { - type: "Boolean"; - defaultValue: boolean; - directives: Directive[]; -}; - -export function getDirectedArgument( - relationshipAdapter: RelationshipAdapter, - features: Neo4jFeaturesSettings | undefined -): DirectedArgument | undefined { - let defaultValue: boolean; - switch (relationshipAdapter.queryDirection) { - case RelationshipQueryDirectionOption.DEFAULT_DIRECTED: - defaultValue = true; - break; - case RelationshipQueryDirectionOption.DEFAULT_UNDIRECTED: - defaultValue = false; - break; - default: - return undefined; - } - - if (shouldAddDeprecatedFields(features, "directedArgument")) { - return { - type: "Boolean", - defaultValue, - directives: [DEPRECATE_DIRECTED_ARGUMENT], - }; - } -} - -export function addDirectedArgument>( - args: T, - relationshipAdapter: RelationshipAdapter | RelationshipDeclarationAdapter, - features: Neo4jFeaturesSettings | undefined -): T & { directed?: DirectedArgument } { - if (relationshipAdapter instanceof RelationshipDeclarationAdapter) { - return { ...args }; - } - - const directedArg = getDirectedArgument(relationshipAdapter, features); - if (directedArg) { - return { ...args, directed: directedArg }; - } - - return { ...args }; -} diff --git a/packages/graphql/src/schema/generation/augment-object-or-interface.ts b/packages/graphql/src/schema/generation/augment-object-or-interface.ts index e90b814d23..37d2252553 100644 --- a/packages/graphql/src/schema/generation/augment-object-or-interface.ts +++ b/packages/graphql/src/schema/generation/augment-object-or-interface.ts @@ -27,7 +27,6 @@ import { RelationshipAdapter } from "../../schema-model/relationship/model-adapt import type { RelationshipDeclarationAdapter } from "../../schema-model/relationship/model-adapters/RelationshipDeclarationAdapter"; import type { ConnectionQueryArgs, Neo4jFeaturesSettings } from "../../types"; import { DEPRECATE_OPTIONS_ARGUMENT } from "../constants"; -import { addDirectedArgument, getDirectedArgument } from "../directed-argument"; import { connectionFieldResolver } from "../pagination"; import { graphqlDirectivesToCompose } from "../to-compose"; import { @@ -102,12 +101,6 @@ export function augmentObjectOrInterfaceTypeWithRelationshipField({ }; } - if (relationshipAdapter instanceof RelationshipAdapter) { - const directedArg = getDirectedArgument(relationshipAdapter, features); - if (directedArg) { - nodeFieldsArgs["directed"] = directedArg; - } - } relationshipField.args = nodeFieldsArgs; } @@ -129,23 +122,19 @@ export function augmentObjectOrInterfaceTypeWithConnectionField( (directive) => directive.name.value === DEPRECATED ) ); - const composeNodeArgs = addDirectedArgument( - { - where: makeConnectionWhereInputType({ - relationshipAdapter, - composer: schemaComposer, - features, - }), - first: { - type: GraphQLInt, - }, - after: { - type: GraphQLString, - }, + const composeNodeArgs: ObjectTypeComposerArgumentConfigMapDefinition = { + where: makeConnectionWhereInputType({ + relationshipAdapter, + composer: schemaComposer, + features, + }), + first: { + type: GraphQLInt, }, - relationshipAdapter, - features - ); + after: { + type: GraphQLString, + }, + }; const connectionSortITC = withConnectionSortInputType({ relationshipAdapter, composer: schemaComposer, diff --git a/packages/graphql/src/schema/get-relationship-meta.test.ts b/packages/graphql/src/schema/get-relationship-meta.test.ts index 5702fbecf6..d6234a1f73 100644 --- a/packages/graphql/src/schema/get-relationship-meta.test.ts +++ b/packages/graphql/src/schema/get-relationship-meta.test.ts @@ -377,7 +377,7 @@ describe("getRelationshipMeta", () => { { // @ts-ignore name: { value: "queryDirection" }, - value: { kind: Kind.ENUM, value: "DEFAULT_UNDIRECTED" }, + value: { kind: Kind.ENUM, value: "UNDIRECTED" }, }, ], }, @@ -389,7 +389,7 @@ describe("getRelationshipMeta", () => { expect(result).toMatchObject({ type: "ACTED_IN", direction: "IN", - queryDirection: "DEFAULT_UNDIRECTED", + queryDirection: "UNDIRECTED", }); }); @@ -592,7 +592,7 @@ describe("getRelationshipMeta", () => { { // @ts-ignore name: { value: "queryDirection" }, - value: { kind: Kind.ENUM, value: "DEFAULT_UNDIRECTED" }, + value: { kind: Kind.ENUM, value: "UNDIRECTED" }, }, { // @ts-ignore @@ -622,7 +622,7 @@ describe("getRelationshipMeta", () => { type: "ACTED_IN", direction: "IN", properties: "ActedIn", - queryDirection: "DEFAULT_UNDIRECTED", + queryDirection: "UNDIRECTED", nestedOperations: ["CONNECT", "CREATE"], }); }); diff --git a/packages/graphql/src/schema/validation/custom-rules/warnings/query-direction-deprecated-values.ts b/packages/graphql/src/schema/validation/custom-rules/warnings/query-direction-deprecated-values.ts deleted file mode 100644 index b0718b1b32..0000000000 --- a/packages/graphql/src/schema/validation/custom-rules/warnings/query-direction-deprecated-values.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Kind, type ASTVisitor, type DirectiveNode } from "graphql"; -import { RelationshipQueryDirectionOption } from "../../../../constants"; -import { relationshipDirective } from "../../../../graphql/directives"; - -export function WarnIfQueryDirectionIsUsedWithDeprecatedValues(): ASTVisitor { - let warningAlreadyIssued = false; - - return { - Directive(directive: DirectiveNode) { - if (warningAlreadyIssued) { - return; - } - if (relationshipDirective.name === directive.name.value) { - const queryDirection = directive.arguments?.find((arg) => arg.name.value === "queryDirection"); - const queryDirectionValue = - queryDirection && queryDirection.value.kind === Kind.ENUM && queryDirection.value.value; - if ( - queryDirectionValue && - [ - RelationshipQueryDirectionOption[RelationshipQueryDirectionOption.DEFAULT_DIRECTED], - RelationshipQueryDirectionOption[RelationshipQueryDirectionOption.DEFAULT_UNDIRECTED], - ].includes(RelationshipQueryDirectionOption[queryDirectionValue]) - ) { - console.warn( - `Found @relationship argument "queryDirection" used with ${queryDirectionValue} which is deprecated. \n These default values were used to set a default for the "directed" argument, which is also now deprecated.` - ); - warningAlreadyIssued = true; - } - - if ( - queryDirectionValue && - [ - RelationshipQueryDirectionOption[RelationshipQueryDirectionOption.DIRECTED_ONLY], - RelationshipQueryDirectionOption[RelationshipQueryDirectionOption.UNDIRECTED_ONLY], - ].includes(RelationshipQueryDirectionOption[queryDirectionValue]) - ) { - console.warn( - `Found @relationship argument "queryDirection" used with ${queryDirectionValue} which is deprecated. Please use "DIRECTED" or "UNDIRECTED" instead.` - ); - warningAlreadyIssued = true; - } - } - }, - }; -} diff --git a/packages/graphql/src/schema/validation/validate-document.test.ts b/packages/graphql/src/schema/validation/validate-document.test.ts index 66e7fd6209..928f9129b4 100644 --- a/packages/graphql/src/schema/validation/validate-document.test.ts +++ b/packages/graphql/src/schema/validation/validate-document.test.ts @@ -315,70 +315,6 @@ describe("warns if queryDirection deprecated values are used", () => { warn.mockReset(); }); - test("should warn if queryDirection with DEFAULT prefix is used", () => { - const doc = gql` - type Actor @node { - name: String - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) - } - type Movie @node { - title: String - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: IN, queryDirection: DEFAULT_DIRECTED) - } - `; - - validateDocument({ - document: doc, - additionalDefinitions, - features: {}, - }); - expect(warn).toHaveBeenCalledExactlyOnceWith( - `Found @relationship argument "queryDirection" used with DEFAULT_DIRECTED which is deprecated. \n These default values were used to set a default for the "directed" argument, which is also now deprecated.` - ); - }); - - test("should warn if queryDirection with DIRECTED_ONLY suffix is used", () => { - const doc = gql` - type Actor @node { - name: String - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) - } - type Movie @node { - title: String - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: IN, queryDirection: DIRECTED_ONLY) - } - `; - - validateDocument({ - document: doc, - additionalDefinitions, - features: {}, - }); - expect(warn).toHaveBeenCalledExactlyOnceWith( - `Found @relationship argument "queryDirection" used with DIRECTED_ONLY which is deprecated. Please use "DIRECTED" or "UNDIRECTED" instead.` - ); - }); - - test("should warn once if multiple deprecation values are used", () => { - const doc = gql` - type Actor @node { - name: String - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, queryDirection: DEFAULT_DIRECTED) - } - type Movie @node { - title: String - movies: [Movie!]! @relationship(type: "ACTED_IN", direction: IN, queryDirection: DIRECTED_ONLY) - } - `; - - validateDocument({ - document: doc, - additionalDefinitions, - features: {}, - }); - expect(warn).toHaveBeenCalledTimes(1); - }); - test("should not warn if no deprecation values are used", () => { const doc = gql` type Actor @node { diff --git a/packages/graphql/src/schema/validation/validate-document.ts b/packages/graphql/src/schema/validation/validate-document.ts index 40cc9fcbaf..b97382404f 100644 --- a/packages/graphql/src/schema/validation/validate-document.ts +++ b/packages/graphql/src/schema/validation/validate-document.ts @@ -65,7 +65,6 @@ import { WarnIfAuthorizationFeatureDisabled } from "./custom-rules/warnings/auth import { WarnIfAMaxLimitCanBeBypassedThroughInterface } from "./custom-rules/warnings/limit-max-can-be-bypassed"; import { WarnIfListOfListsFieldDefinition } from "./custom-rules/warnings/list-of-lists"; import { WarnObjectFieldsWithoutResolver } from "./custom-rules/warnings/object-fields-without-resolver"; -import { WarnIfQueryDirectionIsUsedWithDeprecatedValues } from "./custom-rules/warnings/query-direction-deprecated-values"; import { WarnIfSubscriptionsAuthorizationMissing } from "./custom-rules/warnings/subscriptions-authorization-missing"; import { WarnIfTypeIsNotMarkedAsNode } from "./custom-rules/warnings/warn-if-type-is-not-marked-as-node"; import { validateSchemaCustomizations } from "./validate-schema-customizations"; @@ -232,7 +231,6 @@ function runValidationRulesOnFilteredDocument({ }), WarnIfSubscriptionsAuthorizationMissing(Boolean(features?.subscriptions)), WarnIfTypeIsNotMarkedAsNode(), - WarnIfQueryDirectionIsUsedWithDeprecatedValues, ], schema ); diff --git a/packages/graphql/src/translate/create-connect-and-params.test.ts b/packages/graphql/src/translate/create-connect-and-params.test.ts index 37d20ea2ab..47b2994c5b 100644 --- a/packages/graphql/src/translate/create-connect-and-params.test.ts +++ b/packages/graphql/src/translate/create-connect-and-params.test.ts @@ -46,7 +46,7 @@ describe("createConnectAndParams", () => { type: "`SIMILAR`", typeUnescaped: "SIMILAR", fieldName: "similarMovies", - queryDirection: RelationshipQueryDirectionOption.DEFAULT_DIRECTED, + queryDirection: RelationshipQueryDirectionOption.DIRECTED, aggregate: true, inherited: false, typeMeta: { diff --git a/packages/graphql/src/translate/create-disconnect-and-params.test.ts b/packages/graphql/src/translate/create-disconnect-and-params.test.ts index c3fd5fe217..8e904d2b1b 100644 --- a/packages/graphql/src/translate/create-disconnect-and-params.test.ts +++ b/packages/graphql/src/translate/create-disconnect-and-params.test.ts @@ -39,7 +39,7 @@ describe("createDisconnectAndParams", () => { typeUnescaped: "SIMILAR", type: "`SIMILAR`", fieldName: "similarMovies", - queryDirection: RelationshipQueryDirectionOption.DEFAULT_DIRECTED, + queryDirection: RelationshipQueryDirectionOption.DIRECTED, aggregate: true, inherited: false, typeMeta: { diff --git a/packages/graphql/src/types/index.ts b/packages/graphql/src/types/index.ts index e763ea6f37..9f69d80c73 100644 --- a/packages/graphql/src/types/index.ts +++ b/packages/graphql/src/types/index.ts @@ -449,7 +449,6 @@ export type Neo4jFeaturesSettings = { excludeDeprecatedFields?: { implicitEqualFilters?: boolean; deprecatedOptionsArgument?: boolean; - directedArgument?: boolean; }; vector?: Neo4jVectorSettings; }; diff --git a/packages/graphql/src/utils/get-relationship-direction.ts b/packages/graphql/src/utils/get-relationship-direction.ts index cd7f1fcce3..63a8403f9c 100644 --- a/packages/graphql/src/utils/get-relationship-direction.ts +++ b/packages/graphql/src/utils/get-relationship-direction.ts @@ -45,11 +45,7 @@ function getRelationshipDirection( /** * Duplicate of the schema-model `getCypherDirection` method; **/ - if ( - fieldArgs.directed === false || - relationField.queryDirection === RelationshipQueryDirectionOption.UNDIRECTED_ONLY || - relationField.queryDirection === RelationshipQueryDirectionOption.UNDIRECTED - ) { + if (fieldArgs.directed === false || relationField.queryDirection === RelationshipQueryDirectionOption.UNDIRECTED) { return "undirected"; } return relationField.direction; diff --git a/packages/graphql/tests/integration/deprecations/query-direction-deprecated-options.int.test.ts b/packages/graphql/tests/integration/deprecations/query-direction-deprecated-options.int.test.ts index 143012e4eb..0fec4a0e78 100644 --- a/packages/graphql/tests/integration/deprecations/query-direction-deprecated-options.int.test.ts +++ b/packages/graphql/tests/integration/deprecations/query-direction-deprecated-options.int.test.ts @@ -48,11 +48,11 @@ describe("query-direction deprecated options", () => { await testHelper.close(); }); - test("should return related node using the queryDirection DIRECTED_ONLY", async () => { + test("should return related node using the queryDirection DIRECTED", async () => { const typeDefs = /* GraphQL */ ` type ${Person} @node { name: String! - friends: [${Person}!]! @relationship(type: "HAS_FRIEND", direction: OUT, queryDirection: DIRECTED_ONLY) + friends: [${Person}!]! @relationship(type: "HAS_FRIEND", direction: OUT, queryDirection: DIRECTED) } `; await testHelper.initNeo4jGraphQL({ typeDefs }); @@ -101,11 +101,11 @@ describe("query-direction deprecated options", () => { }); }); - test("should return related node using the queryDirection UNDIRECTED_ONLY", async () => { + test("should return related node using the queryDirection UNDIRECTED", async () => { const typeDefs = /* GraphQL */ ` type ${Person} @node { name: String! - friends: [${Person}!]! @relationship(type: "HAS_FRIEND", direction: OUT, queryDirection: UNDIRECTED_ONLY) + friends: [${Person}!]! @relationship(type: "HAS_FRIEND", direction: OUT, queryDirection: UNDIRECTED) } `; await testHelper.initNeo4jGraphQL({ typeDefs }); @@ -160,230 +160,4 @@ describe("query-direction deprecated options", () => { ]), }); }); - - test("should return related node using the queryDirection DEFAULT_DIRECTED", async () => { - const typeDefs = /* GraphQL */ ` - type ${Person} @node { - name: String! - friends: [${Person}!]! @relationship(type: "HAS_FRIEND", direction: OUT, queryDirection: DEFAULT_DIRECTED) - } - `; - await testHelper.initNeo4jGraphQL({ typeDefs }); - const query = /* GraphQL */ ` - { - ${Person.plural} { - name - friends { - name - } - } - } - `; - - const gqlResult = await testHelper.executeGraphQL(query); - - if (gqlResult.errors) { - console.log(JSON.stringify(gqlResult.errors, null, 2)); - } - - expect(gqlResult.errors).toBeUndefined(); - - expect(gqlResult.data).toEqual({ - [Person.plural]: expect.toIncludeSameMembers([ - { - name: stefan, - friends: expect.toIncludeSameMembers([ - { - name: mike, - }, - ]), - }, - { - name: mike, - friends: expect.toIncludeSameMembers([ - { - name: charlie, - }, - ]), - }, - { - name: charlie, - friends: [], - }, - ]), - }); - }); - - test("should return related node using the queryDirection DEFAULT_UNDIRECTED", async () => { - const typeDefs = /* GraphQL */ ` - type ${Person} @node { - name: String! - friends: [${Person}!]! @relationship(type: "HAS_FRIEND", direction: OUT, queryDirection: DEFAULT_UNDIRECTED) - } - `; - await testHelper.initNeo4jGraphQL({ typeDefs }); - const query = /* GraphQL */ ` - { - ${Person.plural} { - name - friends { - name - } - } - } - `; - - const gqlResult = await testHelper.executeGraphQL(query); - - if (gqlResult.errors) { - console.log(JSON.stringify(gqlResult.errors, null, 2)); - } - - expect(gqlResult.errors).toBeUndefined(); - - expect(gqlResult.data).toEqual({ - [Person.plural]: expect.toIncludeSameMembers([ - { - name: stefan, - friends: expect.toIncludeSameMembers([ - { - name: mike, - }, - ]), - }, - { - name: mike, - friends: expect.toIncludeSameMembers([ - { - name: stefan, - }, - { - name: charlie, - }, - ]), - }, - { - name: charlie, - friends: expect.toIncludeSameMembers([ - { - name: mike, - }, - ]), - }, - ]), - }); - }); - - test("should return related node using the queryDirection DEFAULT_DIRECTED + directed arg", async () => { - const typeDefs = /* GraphQL */ ` - type ${Person} @node { - name: String! - friends: [${Person}!]! @relationship(type: "HAS_FRIEND", direction: OUT, queryDirection: DEFAULT_DIRECTED) - } - `; - await testHelper.initNeo4jGraphQL({ typeDefs }); - const query = /* GraphQL */ ` - { - ${Person.plural} { - name - friends(directed: false) { - name - } - } - } - `; - - const gqlResult = await testHelper.executeGraphQL(query); - - if (gqlResult.errors) { - console.log(JSON.stringify(gqlResult.errors, null, 2)); - } - - expect(gqlResult.errors).toBeUndefined(); - - expect(gqlResult.data).toEqual({ - [Person.plural]: expect.toIncludeSameMembers([ - { - name: stefan, - friends: expect.toIncludeSameMembers([ - { - name: mike, - }, - ]), - }, - { - name: mike, - friends: expect.toIncludeSameMembers([ - { - name: stefan, - }, - { - name: charlie, - }, - ]), - }, - { - name: charlie, - friends: expect.toIncludeSameMembers([ - { - name: mike, - }, - ]), - }, - ]), - }); - }); - - test("should return related node using the queryDirection DEFAULT_UNDIRECTED + directed arg", async () => { - const typeDefs = /* GraphQL */ ` - type ${Person} @node { - name: String! - friends: [${Person}!]! @relationship(type: "HAS_FRIEND", direction: OUT, queryDirection: DEFAULT_UNDIRECTED) - } - `; - await testHelper.initNeo4jGraphQL({ typeDefs }); - const query = /* GraphQL */ ` - { - ${Person.plural} { - name - friends(directed: true) { - name - } - } - } - `; - - const gqlResult = await testHelper.executeGraphQL(query); - - if (gqlResult.errors) { - console.log(JSON.stringify(gqlResult.errors, null, 2)); - } - - expect(gqlResult.errors).toBeUndefined(); - - expect(gqlResult.data).toEqual({ - [Person.plural]: expect.toIncludeSameMembers([ - { - name: stefan, - friends: expect.toIncludeSameMembers([ - { - name: mike, - }, - ]), - }, - { - name: mike, - friends: expect.toIncludeSameMembers([ - { - name: charlie, - }, - ]), - }, - { - name: charlie, - friends: [], - }, - ]), - }); - }); }); diff --git a/packages/graphql/tests/integration/issues/1348.int.test.ts b/packages/graphql/tests/integration/issues/1348.int.test.ts index e027f41ab1..49206e71e0 100644 --- a/packages/graphql/tests/integration/issues/1348.int.test.ts +++ b/packages/graphql/tests/integration/issues/1348.int.test.ts @@ -40,14 +40,14 @@ describe("https://github.com/neo4j/graphql/issues/1348", () => { type ${Series} implements Product @node { productTitle: String! - relatedTo: [Product!]! @relationship(type: "RELATES_TO", direction: OUT, queryDirection: DEFAULT_UNDIRECTED) + relatedTo: [Product!]! @relationship(type: "RELATES_TO", direction: OUT, queryDirection: UNDIRECTED) seasons: [${Season}!]! } type ${Season} implements Product @node { productTitle: String! - relatedTo: [Product!]! @relationship(type: "RELATES_TO", direction: OUT, queryDirection: DEFAULT_UNDIRECTED) + relatedTo: [Product!]! @relationship(type: "RELATES_TO", direction: OUT, queryDirection: UNDIRECTED) seasonNumber: Int episodes: [${ProgrammeItem}!]! @@ -55,7 +55,7 @@ describe("https://github.com/neo4j/graphql/issues/1348", () => { type ${ProgrammeItem} implements Product @node { productTitle: String! - relatedTo: [Product!]! @relationship(type: "RELATES_TO", direction: OUT, queryDirection: DEFAULT_UNDIRECTED) + relatedTo: [Product!]! @relationship(type: "RELATES_TO", direction: OUT, queryDirection: UNDIRECTED) episodeNumber: Int } diff --git a/packages/graphql/tests/integration/issues/4292.int.test.ts b/packages/graphql/tests/integration/issues/4292.int.test.ts index 4a77ee5683..84713f8815 100644 --- a/packages/graphql/tests/integration/issues/4292.int.test.ts +++ b/packages/graphql/tests/integration/issues/4292.int.test.ts @@ -104,7 +104,7 @@ describe("https://github.com/neo4j/graphql/issues/4292", () => { partners: [${Person.name}!]! @relationship( type: "PARTNER_OF" - queryDirection: UNDIRECTED_ONLY + queryDirection: UNDIRECTED direction: OUT properties: "PartnerOf" ) diff --git a/packages/graphql/tests/integration/undirected-relationships.test.ts b/packages/graphql/tests/integration/undirected-relationships.test.ts deleted file mode 100644 index c07a6c8d5e..0000000000 --- a/packages/graphql/tests/integration/undirected-relationships.test.ts +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { gql } from "graphql-tag"; -import { UniqueType } from "../utils/graphql-types"; -import { TestHelper } from "../utils/tests-helper"; - -describe("undirected relationships", () => { - const testHelper = new TestHelper(); - - afterEach(async () => { - await testHelper.close(); - }); - - test("query for an undirected relationship", async () => { - const userType = new UniqueType("User"); - const typeDefs = gql` - type ${userType.name} @node { - name: String! - friends: [${userType.name}!]! @relationship(type: "FRIENDS_WITH", direction: OUT) - } - `; - - await testHelper.initNeo4jGraphQL({ - typeDefs, - }); - const query = /* GraphQL */ ` - query { - ${userType.plural}(where: { name_EQ: "Ford"}) { - name - friends: friends(directed: false) { - name - } - directedFriends: friends(directed: true) { - name - } - } - } - `; - await testHelper.executeCypher(` - CREATE (a:${userType.name} {name: "Arthur"}) - CREATE (b:${userType.name} {name: "Ford"}) - CREATE (a)-[:FRIENDS_WITH]->(b) - `); - const gqlResult = await testHelper.executeGraphQL(query); - - expect(gqlResult.errors).toBeUndefined(); - expect(gqlResult.data).toEqual({ - [userType.plural]: [ - { - name: "Ford", - directedFriends: [], - // The real treasure we made along the way - friends: [ - { - name: "Arthur", - }, - ], - }, - ], - }); - }); - - test("query for an undirected relationship on single relationship", async () => { - const userType = new UniqueType("User"); - const typeDefs = gql` - type ${userType.name} @node { - name: String! - friend: ${userType.name} @relationship(type: "FRIENDS_WITH", direction: OUT) - } - `; - - await testHelper.initNeo4jGraphQL({ - typeDefs, - }); - const query = /* GraphQL */ ` - query { - ${userType.plural}(where: {name_EQ: "Ford"}) { - name - friend: friend(directed: false) { - name - } - directedFriend: friend(directed: true) { - name - } - } - } - `; - await testHelper.executeCypher(` - CREATE (a:${userType.name} {name: "Arthur"}) - CREATE (b:${userType.name} {name: "Ford"}) - CREATE (a)-[:FRIENDS_WITH]->(b) - `); - const gqlResult = await testHelper.executeGraphQL(query); - - expect(gqlResult.errors).toBeUndefined(); - expect(gqlResult.data).toEqual({ - [userType.plural]: [ - { - name: "Ford", - directedFriend: null, - friend: { - name: "Arthur", - }, - }, - ], - }); - }); -}); diff --git a/packages/graphql/tests/schema/aggregations.test.ts b/packages/graphql/tests/schema/aggregations.test.ts index 6df7211d73..8e434ad6f5 100644 --- a/packages/graphql/tests/schema/aggregations.test.ts +++ b/packages/graphql/tests/schema/aggregations.test.ts @@ -809,9 +809,9 @@ describe("Aggregations", () => { } type Post { - likes(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! - likesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: UserWhere): PostUserLikesAggregationSelection - likesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [PostLikesConnectionSort!], where: PostLikesConnectionWhere): PostLikesConnection! + likes(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! + likesAggregate(where: UserWhere): PostUserLikesAggregationSelection + likesConnection(after: String, first: Int, sort: [PostLikesConnectionSort!], where: PostLikesConnectionWhere): PostLikesConnection! title: String } diff --git a/packages/graphql/tests/schema/array-methods.test.ts b/packages/graphql/tests/schema/array-methods.test.ts index 7b6767dc8d..8e0e9df2fb 100644 --- a/packages/graphql/tests/schema/array-methods.test.ts +++ b/packages/graphql/tests/schema/array-methods.test.ts @@ -83,9 +83,9 @@ describe("Arrays Methods", () => { } type Actor { - actedIn(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - actedInAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + actedInAggregate(where: MovieWhere): ActorMovieActedInAggregationSelection + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String } @@ -347,9 +347,9 @@ describe("Arrays Methods", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! averageRating: Float! id: ID! ratings: [Float!]! diff --git a/packages/graphql/tests/schema/authorization.test.ts b/packages/graphql/tests/schema/authorization.test.ts index 04bcb64f1c..f78cefefdf 100644 --- a/packages/graphql/tests/schema/authorization.test.ts +++ b/packages/graphql/tests/schema/authorization.test.ts @@ -96,9 +96,9 @@ describe("Authorization", () => { } type Post { - author(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): User! - authorAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: UserWhere): PostUserAuthorAggregationSelection - authorConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! + author(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): User! + authorAggregate(where: UserWhere): PostUserAuthorAggregationSelection + authorConnection(after: String, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! id: ID! name: String! } @@ -332,9 +332,9 @@ describe("Authorization", () => { type User { id: ID! name: String! - posts(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! - postsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: UserWhere): UserUserPostsAggregationSelection - postsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! + posts(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! + postsAggregate(where: UserWhere): UserUserPostsAggregationSelection + postsConnection(after: String, first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! } type UserAggregateSelection { diff --git a/packages/graphql/tests/schema/comments.test.ts b/packages/graphql/tests/schema/comments.test.ts index fe8c502906..b3acbd0c5c 100644 --- a/packages/graphql/tests/schema/comments.test.ts +++ b/packages/graphql/tests/schema/comments.test.ts @@ -389,9 +389,9 @@ describe("Comments", () => { type Movie { \\"\\"\\"Actors in Movie\\"\\"\\" - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -736,9 +736,9 @@ describe("Comments", () => { type Actor { \\"\\"\\"Acted in Production\\"\\"\\" - actedIn(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - actedInAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ProductionWhere): ActorProductionActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! + actedInAggregate(where: ProductionWhere): ActorProductionActedInAggregationSelection + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -1372,8 +1372,8 @@ describe("Comments", () => { type Movie { id: ID - search(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: SearchWhere): [Search!]! - searchConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: MovieSearchConnectionWhere): MovieSearchConnection! + search(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: SearchWhere): [Search!]! + searchConnection(after: String, first: Int, where: MovieSearchConnectionWhere): MovieSearchConnection! searchNoDirective: Search } diff --git a/packages/graphql/tests/schema/connections/enums.test.ts b/packages/graphql/tests/schema/connections/enums.test.ts index 280b92b65a..4e50ada991 100644 --- a/packages/graphql/tests/schema/connections/enums.test.ts +++ b/packages/graphql/tests/schema/connections/enums.test.ts @@ -84,9 +84,9 @@ describe("Enums", () => { } type Actor { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! name: String! } @@ -320,9 +320,9 @@ describe("Enums", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String! } diff --git a/packages/graphql/tests/schema/connections/interfaces.test.ts b/packages/graphql/tests/schema/connections/interfaces.test.ts index 72c1d0833c..5260a6ff05 100644 --- a/packages/graphql/tests/schema/connections/interfaces.test.ts +++ b/packages/graphql/tests/schema/connections/interfaces.test.ts @@ -272,9 +272,9 @@ describe("Connection with interfaces", () => { } type Movie implements Production { - director(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: CreatureOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [CreatureSort!], where: CreatureWhere): [Creature!]! - directorAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: CreatureWhere): MovieCreatureDirectorAggregationSelection - directorConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ProductionDirectorConnectionSort!], where: ProductionDirectorConnectionWhere): ProductionDirectorConnection! + director(limit: Int, offset: Int, options: CreatureOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [CreatureSort!], where: CreatureWhere): [Creature!]! + directorAggregate(where: CreatureWhere): MovieCreatureDirectorAggregationSelection + directorConnection(after: String, first: Int, sort: [ProductionDirectorConnectionSort!], where: ProductionDirectorConnectionWhere): ProductionDirectorConnection! id: ID title: String! } @@ -475,9 +475,9 @@ describe("Connection with interfaces", () => { type Person implements Creature { id: ID - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): Production! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ProductionWhere): PersonProductionMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [CreatureMoviesConnectionSort!], where: CreatureMoviesConnectionWhere): CreatureMoviesConnection! + movies(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): Production! + moviesAggregate(where: ProductionWhere): PersonProductionMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [CreatureMoviesConnectionSort!], where: CreatureMoviesConnectionWhere): CreatureMoviesConnection! } type PersonAggregateSelection { @@ -827,9 +827,9 @@ describe("Connection with interfaces", () => { } type Series implements Production { - director(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: CreatureOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [CreatureSort!], where: CreatureWhere): [Creature!]! - directorAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: CreatureWhere): SeriesCreatureDirectorAggregationSelection - directorConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ProductionDirectorConnectionSort!], where: ProductionDirectorConnectionWhere): ProductionDirectorConnection! + director(limit: Int, offset: Int, options: CreatureOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [CreatureSort!], where: CreatureWhere): [Creature!]! + directorAggregate(where: CreatureWhere): SeriesCreatureDirectorAggregationSelection + directorConnection(after: String, first: Int, sort: [ProductionDirectorConnectionSort!], where: ProductionDirectorConnectionWhere): ProductionDirectorConnection! episode: Int! id: ID title: String! diff --git a/packages/graphql/tests/schema/connections/sort.test.ts b/packages/graphql/tests/schema/connections/sort.test.ts index 2fdf786159..9c76a655f5 100644 --- a/packages/graphql/tests/schema/connections/sort.test.ts +++ b/packages/graphql/tests/schema/connections/sort.test.ts @@ -80,9 +80,9 @@ describe("Sort", () => { type Node1 { property: String! - relatedTo(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: Node2Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: Node2Where): [Node2!]! - relatedToAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: Node2Where): Node1Node2RelatedToAggregationSelection - relatedToConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: Node1RelatedToConnectionWhere): Node1RelatedToConnection! + relatedTo(limit: Int, offset: Int, options: Node2Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: Node2Where): [Node2!]! + relatedToAggregate(where: Node2Where): Node1Node2RelatedToAggregationSelection + relatedToConnection(after: String, first: Int, where: Node1RelatedToConnectionWhere): Node1RelatedToConnection! } type Node1AggregateSelection { @@ -252,9 +252,9 @@ describe("Sort", () => { } type Node2 { - relatedTo(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: Node1Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Node1Sort!], where: Node1Where): [Node1!]! - relatedToAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: Node1Where): Node2Node1RelatedToAggregationSelection - relatedToConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [Node2RelatedToConnectionSort!], where: Node2RelatedToConnectionWhere): Node2RelatedToConnection! + relatedTo(limit: Int, offset: Int, options: Node1Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Node1Sort!], where: Node1Where): [Node1!]! + relatedToAggregate(where: Node1Where): Node2Node1RelatedToAggregationSelection + relatedToConnection(after: String, first: Int, sort: [Node2RelatedToConnectionSort!], where: Node2RelatedToConnectionWhere): Node2RelatedToConnection! } type Node2AggregateSelection { diff --git a/packages/graphql/tests/schema/connections/unions.test.ts b/packages/graphql/tests/schema/connections/unions.test.ts index d1899edcd8..9f262df1ce 100644 --- a/packages/graphql/tests/schema/connections/unions.test.ts +++ b/packages/graphql/tests/schema/connections/unions.test.ts @@ -57,8 +57,8 @@ describe("Unions", () => { type Author { name: String! - publications(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PublicationWhere): [Publication!]! - publicationsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [AuthorPublicationsConnectionSort!], where: AuthorPublicationsConnectionWhere): AuthorPublicationsConnection! + publications(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PublicationWhere): [Publication!]! + publicationsConnection(after: String, first: Int, sort: [AuthorPublicationsConnectionSort!], where: AuthorPublicationsConnectionWhere): AuthorPublicationsConnection! } type AuthorAggregateSelection { @@ -302,9 +302,9 @@ describe("Unions", () => { } type Book { - author(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: AuthorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [AuthorSort!], where: AuthorWhere): [Author!]! - authorAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: AuthorWhere): BookAuthorAuthorAggregationSelection - authorConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [BookAuthorConnectionSort!], where: BookAuthorConnectionWhere): BookAuthorConnection! + author(limit: Int, offset: Int, options: AuthorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [AuthorSort!], where: AuthorWhere): [Author!]! + authorAggregate(where: AuthorWhere): BookAuthorAuthorAggregationSelection + authorConnection(after: String, first: Int, sort: [BookAuthorConnectionSort!], where: BookAuthorConnectionWhere): BookAuthorConnection! title: String! } @@ -556,9 +556,9 @@ describe("Unions", () => { } type Journal { - author(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: AuthorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [AuthorSort!], where: AuthorWhere): [Author!]! - authorAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: AuthorWhere): JournalAuthorAuthorAggregationSelection - authorConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [JournalAuthorConnectionSort!], where: JournalAuthorConnectionWhere): JournalAuthorConnection! + author(limit: Int, offset: Int, options: AuthorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [AuthorSort!], where: AuthorWhere): [Author!]! + authorAggregate(where: AuthorWhere): JournalAuthorAuthorAggregationSelection + authorConnection(after: String, first: Int, sort: [JournalAuthorConnectionSort!], where: JournalAuthorConnectionWhere): JournalAuthorConnection! subject: String! } diff --git a/packages/graphql/tests/schema/directive-preserve.test.ts b/packages/graphql/tests/schema/directive-preserve.test.ts index b2e38a08cf..4b814f1ca7 100644 --- a/packages/graphql/tests/schema/directive-preserve.test.ts +++ b/packages/graphql/tests/schema/directive-preserve.test.ts @@ -230,9 +230,9 @@ describe("Directive-preserve", () => { } type Genre { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): GenreMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): GenreMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! name: String } @@ -483,9 +483,9 @@ describe("Directive-preserve", () => { } type Movie { - genres(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): [Genre!]! @deprecated(reason: \\"Do not use\\") - genresAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: GenreWhere): MovieGenreGenresAggregationSelection @deprecated(reason: \\"Do not use\\") - genresConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! @deprecated(reason: \\"Do not use\\") + genres(limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): [Genre!]! @deprecated(reason: \\"Do not use\\") + genresAggregate(where: GenreWhere): MovieGenreGenresAggregationSelection @deprecated(reason: \\"Do not use\\") + genresConnection(after: String, first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! @deprecated(reason: \\"Do not use\\") imdbRating: Float title: String year: Int @@ -881,9 +881,9 @@ describe("Directive-preserve", () => { } type Actor { - actedIn(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - actedInAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ProductionWhere): ActorProductionActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! + actedInAggregate(where: ProductionWhere): ActorProductionActedInAggregationSelection + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -1135,9 +1135,9 @@ describe("Directive-preserve", () => { } type Movie implements Production { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! @deprecated(reason: \\"Do not use\\") - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Do not use\\") - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! @deprecated(reason: \\"Do not use\\") + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! @deprecated(reason: \\"Do not use\\") + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Do not use\\") + actorsConnection(after: String, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! @deprecated(reason: \\"Do not use\\") runtime: Int! title: String! } @@ -1602,9 +1602,9 @@ describe("Directive-preserve", () => { } type Series implements Production { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): SeriesActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): SeriesActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! episodes: Int! title: String! } @@ -1929,9 +1929,9 @@ describe("Directive-preserve", () => { } type Actor { - actedIn(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - actedInAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ProductionWhere): ActorProductionActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! + actedInAggregate(where: ProductionWhere): ActorProductionActedInAggregationSelection + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -2180,9 +2180,9 @@ describe("Directive-preserve", () => { } type Movie implements Production { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! @deprecated(reason: \\"Do not use\\") - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Do not use\\") - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! @deprecated(reason: \\"Do not use\\") + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! @deprecated(reason: \\"Do not use\\") + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Do not use\\") + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! @deprecated(reason: \\"Do not use\\") runtime: Int! title: String! } @@ -2501,9 +2501,9 @@ describe("Directive-preserve", () => { } type Series implements Production { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): SeriesActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [SeriesActorsConnectionSort!], where: SeriesActorsConnectionWhere): SeriesActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): SeriesActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [SeriesActorsConnectionSort!], where: SeriesActorsConnectionWhere): SeriesActorsConnection! episodes: Int! title: String! } @@ -2851,9 +2851,9 @@ describe("Directive-preserve", () => { } type Actor { - actedIn(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - actedInAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ProductionWhere): ActorProductionActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! + actedInAggregate(where: ProductionWhere): ActorProductionActedInAggregationSelection + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -3102,9 +3102,9 @@ describe("Directive-preserve", () => { } type Movie implements Production { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! runtime: Int! title: String! } @@ -3423,9 +3423,9 @@ describe("Directive-preserve", () => { } type Series implements Production { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): SeriesActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [SeriesActorsConnectionSort!], where: SeriesActorsConnectionWhere): SeriesActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): SeriesActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [SeriesActorsConnectionSort!], where: SeriesActorsConnectionWhere): SeriesActorsConnection! episodes: Int! title: String! } @@ -3711,9 +3711,9 @@ describe("Directive-preserve", () => { } type Blog { - posts(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PostOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PostSort!], where: PostWhere): [Post!]! - postsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: PostWhere): BlogPostPostsAggregationSelection - postsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [BlogPostsConnectionSort!], where: BlogPostsConnectionWhere): BlogPostsConnection! + posts(limit: Int, offset: Int, options: PostOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PostSort!], where: PostWhere): [Post!]! + postsAggregate(where: PostWhere): BlogPostPostsAggregationSelection + postsConnection(after: String, first: Int, sort: [BlogPostsConnectionSort!], where: BlogPostsConnectionWhere): BlogPostsConnection! title: String } @@ -4087,8 +4087,8 @@ describe("Directive-preserve", () => { } type User { - content(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: ContentWhere): [Content!]! @deprecated(reason: \\"Do not use user.content\\") - contentConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: UserContentConnectionWhere): UserContentConnection! @deprecated(reason: \\"Do not use user.content\\") + content(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: ContentWhere): [Content!]! @deprecated(reason: \\"Do not use user.content\\") + contentConnection(after: String, first: Int, where: UserContentConnectionWhere): UserContentConnection! @deprecated(reason: \\"Do not use user.content\\") name: String } diff --git a/packages/graphql/tests/schema/directives/alias.test.ts b/packages/graphql/tests/schema/directives/alias.test.ts index d5f9344121..e61b50d4d0 100644 --- a/packages/graphql/tests/schema/directives/alias.test.ts +++ b/packages/graphql/tests/schema/directives/alias.test.ts @@ -51,9 +51,9 @@ describe("Alias", () => { } type Actor { - actedIn(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - actedInAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + actedInAggregate(where: MovieWhere): ActorMovieActedInAggregationSelection + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! city: String name: String! } diff --git a/packages/graphql/tests/schema/directives/filterable.test.ts b/packages/graphql/tests/schema/directives/filterable.test.ts index b8363cd757..0410a94e5b 100644 --- a/packages/graphql/tests/schema/directives/filterable.test.ts +++ b/packages/graphql/tests/schema/directives/filterable.test.ts @@ -894,9 +894,9 @@ describe("@filterable directive", () => { } type Actor { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! } @@ -1163,9 +1163,9 @@ describe("@filterable directive", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -1516,9 +1516,9 @@ describe("@filterable directive", () => { } type Actor { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! } @@ -1807,9 +1807,9 @@ describe("@filterable directive", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -2160,9 +2160,9 @@ describe("@filterable directive", () => { } type Actor { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! } @@ -2451,9 +2451,9 @@ describe("@filterable directive", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -2789,9 +2789,9 @@ describe("@filterable directive", () => { } type Actor { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! } @@ -3080,9 +3080,9 @@ describe("@filterable directive", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -3385,9 +3385,9 @@ describe("@filterable directive", () => { } type Actor { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! } @@ -3676,9 +3676,9 @@ describe("@filterable directive", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -4031,9 +4031,9 @@ describe("@filterable directive", () => { } type Actor { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! } @@ -4322,9 +4322,9 @@ describe("@filterable directive", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -4653,9 +4653,9 @@ describe("@filterable directive", () => { } type Actor { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! } @@ -4944,9 +4944,9 @@ describe("@filterable directive", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -5254,9 +5254,9 @@ describe("@filterable directive", () => { } type Actor implements Person { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! } @@ -5533,9 +5533,9 @@ describe("@filterable directive", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -5907,9 +5907,9 @@ describe("@filterable directive", () => { } type Actor implements Person { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! } @@ -6186,9 +6186,9 @@ describe("@filterable directive", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -6595,9 +6595,9 @@ describe("@filterable directive", () => { } type Actor implements Person { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! } @@ -6874,9 +6874,9 @@ describe("@filterable directive", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -7252,9 +7252,9 @@ describe("@filterable directive", () => { } type Actor { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! } @@ -7509,9 +7509,9 @@ describe("@filterable directive", () => { } type Appearance { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): AppearanceMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): AppearanceMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! password: String! username: String! } @@ -7805,8 +7805,8 @@ describe("@filterable directive", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -8206,9 +8206,9 @@ describe("@filterable directive", () => { } type Actor { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! } @@ -8463,9 +8463,9 @@ describe("@filterable directive", () => { } type Appearance { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): AppearanceMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): AppearanceMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! password: String! username: String! } @@ -8759,8 +8759,8 @@ describe("@filterable directive", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -9160,9 +9160,9 @@ describe("@filterable directive", () => { } type Actor { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! } @@ -9417,9 +9417,9 @@ describe("@filterable directive", () => { } type Appearance { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): AppearanceMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): AppearanceMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! password: String! username: String! } @@ -9713,8 +9713,8 @@ describe("@filterable directive", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } diff --git a/packages/graphql/tests/schema/directives/populatedBy.test.ts b/packages/graphql/tests/schema/directives/populatedBy.test.ts index ac9712183b..75ca7dd298 100644 --- a/packages/graphql/tests/schema/directives/populatedBy.test.ts +++ b/packages/graphql/tests/schema/directives/populatedBy.test.ts @@ -797,9 +797,9 @@ describe("@populatedBy tests", () => { } type Movie { - genres(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): [Genre!]! - genresAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: GenreWhere): MovieGenreGenresAggregationSelection - genresConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! + genres(limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): [Genre!]! + genresAggregate(where: GenreWhere): MovieGenreGenresAggregationSelection + genresConnection(after: String, first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! id: ID } @@ -1318,9 +1318,9 @@ describe("@populatedBy tests", () => { } type Movie { - genres(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): [Genre!]! - genresAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: GenreWhere): MovieGenreGenresAggregationSelection - genresConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! + genres(limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): [Genre!]! + genresAggregate(where: GenreWhere): MovieGenreGenresAggregationSelection + genresConnection(after: String, first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! id: ID } diff --git a/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts b/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts index 2b51ead867..c28bc2b39b 100644 --- a/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts @@ -325,8 +325,8 @@ describe("@relationship directive, aggregate argument", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -699,9 +699,9 @@ describe("@relationship directive, aggregate argument", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -1086,8 +1086,8 @@ describe("@relationship directive, aggregate argument", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -1538,9 +1538,9 @@ describe("@relationship directive, aggregate argument", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -2021,8 +2021,8 @@ describe("@relationship directive, aggregate argument", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: CastMemberWhere): [CastMember!]! - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: CastMemberWhere): [CastMember!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -2497,8 +2497,8 @@ describe("@relationship directive, aggregate argument", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: CastMemberWhere): [CastMember!]! - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: CastMemberWhere): [CastMember!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } diff --git a/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts b/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts index fc63718e1d..4384a5ca10 100644 --- a/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts @@ -82,9 +82,9 @@ describe("Relationship nested operations", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -399,9 +399,9 @@ describe("Relationship nested operations", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -731,9 +731,9 @@ describe("Relationship nested operations", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -1067,9 +1067,9 @@ describe("Relationship nested operations", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -1394,9 +1394,9 @@ describe("Relationship nested operations", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -1725,9 +1725,9 @@ describe("Relationship nested operations", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -2053,9 +2053,9 @@ describe("Relationship nested operations", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -2372,9 +2372,9 @@ describe("Relationship nested operations", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -2710,13 +2710,13 @@ describe("Relationship nested operations", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID - producers(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - producersAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: PersonWhere): MoviePersonProducersAggregationSelection - producersConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! + producers(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! + producersAggregate(where: PersonWhere): MoviePersonProducersAggregationSelection + producersConnection(after: String, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! } input MovieActorsAggregateInput { @@ -3175,13 +3175,13 @@ describe("Relationship nested operations", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID - producers(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - producersAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: PersonWhere): MoviePersonProducersAggregationSelection - producersConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! + producers(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! + producersAggregate(where: PersonWhere): MoviePersonProducersAggregationSelection + producersConnection(after: String, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! } input MovieActorsAggregateInput { @@ -3628,8 +3628,8 @@ describe("Relationship nested operations", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -4000,8 +4000,8 @@ describe("Relationship nested operations", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -4410,8 +4410,8 @@ describe("Relationship nested operations", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -4828,8 +4828,8 @@ describe("Relationship nested operations", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -5224,8 +5224,8 @@ describe("Relationship nested operations", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -5629,8 +5629,8 @@ describe("Relationship nested operations", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -6026,8 +6026,8 @@ describe("Relationship nested operations", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -6401,8 +6401,8 @@ describe("Relationship nested operations", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -6792,11 +6792,11 @@ describe("Relationship nested operations", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID - producers(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! - producersConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: MovieProducersConnectionWhere): MovieProducersConnection! + producers(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! + producersConnection(after: String, first: Int, where: MovieProducersConnectionWhere): MovieProducersConnection! } type MovieActorsConnection { @@ -7342,11 +7342,11 @@ describe("Relationship nested operations", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID - producers(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! - producersConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: MovieProducersConnectionWhere): MovieProducersConnection! + producers(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! + producersConnection(after: String, first: Int, where: MovieProducersConnectionWhere): MovieProducersConnection! } type MovieActorsConnection { @@ -7842,9 +7842,9 @@ describe("Relationship nested operations", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -8305,9 +8305,9 @@ describe("Relationship nested operations", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -8788,9 +8788,9 @@ describe("Relationship nested operations", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -9270,9 +9270,9 @@ describe("Relationship nested operations", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -9747,9 +9747,9 @@ describe("Relationship nested operations", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -10224,9 +10224,9 @@ describe("Relationship nested operations", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -10698,13 +10698,13 @@ describe("Relationship nested operations", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID - producers(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - producersAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: PersonWhere): MoviePersonProducersAggregationSelection - producersConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! + producers(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! + producersAggregate(where: PersonWhere): MoviePersonProducersAggregationSelection + producersConnection(after: String, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! } input MovieActorsAggregateInput { @@ -11319,13 +11319,13 @@ describe("Relationship nested operations", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID - producers(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - producersAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: PersonWhere): MoviePersonProducersAggregationSelection - producersConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! + producers(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! + producersAggregate(where: PersonWhere): MoviePersonProducersAggregationSelection + producersConnection(after: String, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! } input MovieActorsAggregateInput { diff --git a/packages/graphql/tests/schema/directives/relationship-properties.test.ts b/packages/graphql/tests/schema/directives/relationship-properties.test.ts index 18333037bf..a32ed27b36 100644 --- a/packages/graphql/tests/schema/directives/relationship-properties.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-properties.test.ts @@ -130,9 +130,9 @@ describe("Relationship-properties", () => { } type Actor { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! name: String! } @@ -382,9 +382,9 @@ describe("Relationship-properties", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String! } @@ -785,9 +785,9 @@ describe("Relationship-properties", () => { } type Actor { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! name: String! } @@ -1049,9 +1049,9 @@ describe("Relationship-properties", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String! } @@ -1414,9 +1414,9 @@ describe("Relationship-properties", () => { } type Actor { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! name: String! } @@ -1667,9 +1667,9 @@ describe("Relationship-properties", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String! } diff --git a/packages/graphql/tests/schema/directives/relationship.test.ts b/packages/graphql/tests/schema/directives/relationship.test.ts index 21b2ee7154..ed87227614 100644 --- a/packages/graphql/tests/schema/directives/relationship.test.ts +++ b/packages/graphql/tests/schema/directives/relationship.test.ts @@ -135,9 +135,9 @@ describe("Relationship", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -406,9 +406,9 @@ describe("Relationship", () => { } type Actor { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! name: String } @@ -636,9 +636,9 @@ describe("Relationship", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } diff --git a/packages/graphql/tests/schema/directives/selectable.test.ts b/packages/graphql/tests/schema/directives/selectable.test.ts index 4bcb21f4b3..5274ff69cc 100644 --- a/packages/graphql/tests/schema/directives/selectable.test.ts +++ b/packages/graphql/tests/schema/directives/selectable.test.ts @@ -711,7 +711,7 @@ describe("@selectable", () => { } type Actor { - actedInAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieActedInAggregationSelection + actedInAggregate(where: MovieWhere): ActorMovieActedInAggregationSelection name: String! } @@ -1078,9 +1078,9 @@ describe("@selectable", () => { } type Actor { - actedIn(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - actedInAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + actedInAggregate(where: MovieWhere): ActorMovieActedInAggregationSelection + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -1947,8 +1947,8 @@ describe("@selectable", () => { } type Actor { - actedIn(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: ProductionWhere): [Production!]! + actedInConnection(after: String, first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -2441,7 +2441,7 @@ describe("@selectable", () => { } type Actor { - actedInAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ProductionWhere): ActorProductionActedInAggregationSelection + actedInAggregate(where: ProductionWhere): ActorProductionActedInAggregationSelection name: String! } @@ -2977,9 +2977,9 @@ describe("@selectable", () => { } type Actor { - actedIn(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - actedInAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ProductionWhere): ActorProductionActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! + actedInAggregate(where: ProductionWhere): ActorProductionActedInAggregationSelection + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } diff --git a/packages/graphql/tests/schema/directives/settable.test.ts b/packages/graphql/tests/schema/directives/settable.test.ts index cb9e925fda..b984501f83 100644 --- a/packages/graphql/tests/schema/directives/settable.test.ts +++ b/packages/graphql/tests/schema/directives/settable.test.ts @@ -560,9 +560,9 @@ describe("@settable", () => { } type Actor { - actedIn(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - actedInAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + actedInAggregate(where: MovieWhere): ActorMovieActedInAggregationSelection + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -939,9 +939,9 @@ describe("@settable", () => { } type Actor { - actedIn(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - actedInAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + actedInAggregate(where: MovieWhere): ActorMovieActedInAggregationSelection + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -1305,9 +1305,9 @@ describe("@settable", () => { } type Actor { - actedIn(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - actedInAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + actedInAggregate(where: MovieWhere): ActorMovieActedInAggregationSelection + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -1537,9 +1537,9 @@ describe("@settable", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! description: String title: String! } @@ -1834,9 +1834,9 @@ describe("@settable", () => { } type Actor { - actedIn(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - actedInAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + actedInAggregate(where: MovieWhere): ActorMovieActedInAggregationSelection + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -2074,9 +2074,9 @@ describe("@settable", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! description: String title: String! } @@ -2380,8 +2380,8 @@ describe("@settable", () => { } type Actor { - actedIn(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: ProductionWhere): [Production!]! + actedInConnection(after: String, first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -2853,8 +2853,8 @@ describe("@settable", () => { } type Actor { - actedIn(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: ProductionWhere): [Production!]! + actedInConnection(after: String, first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -3301,8 +3301,8 @@ describe("@settable", () => { } type Actor { - actedIn(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: ProductionWhere): [Production!]! + actedInConnection(after: String, first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -3526,9 +3526,9 @@ describe("@settable", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! description: String title: String! } @@ -3926,8 +3926,8 @@ describe("@settable", () => { } type Actor { - actedIn(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: ProductionWhere): [Production!]! - actedInConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: ProductionWhere): [Production!]! + actedInConnection(after: String, first: Int, where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -4167,9 +4167,9 @@ describe("@settable", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! description: String title: String! } @@ -4573,9 +4573,9 @@ describe("@settable", () => { } type Actor { - actedIn(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - actedInAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ProductionWhere): ActorProductionActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! + actedInAggregate(where: ProductionWhere): ActorProductionActedInAggregationSelection + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -5121,9 +5121,9 @@ describe("@settable", () => { } type Actor { - actedIn(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - actedInAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ProductionWhere): ActorProductionActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! + actedInAggregate(where: ProductionWhere): ActorProductionActedInAggregationSelection + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -5653,9 +5653,9 @@ describe("@settable", () => { } type Actor { - actedIn(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - actedInAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ProductionWhere): ActorProductionActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! + actedInAggregate(where: ProductionWhere): ActorProductionActedInAggregationSelection + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -5890,9 +5890,9 @@ describe("@settable", () => { } type Movie implements Production { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! description: String title: String! } @@ -6278,9 +6278,9 @@ describe("@settable", () => { } type Series implements Production { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): SeriesActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): SeriesActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! description: String title: String! } @@ -6522,9 +6522,9 @@ describe("@settable", () => { } type Actor { - actedIn(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - actedInAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ProductionWhere): ActorProductionActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! + actedInAggregate(where: ProductionWhere): ActorProductionActedInAggregationSelection + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -6767,9 +6767,9 @@ describe("@settable", () => { } type Movie implements Production { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! description: String title: String! } @@ -7178,9 +7178,9 @@ describe("@settable", () => { } type Series implements Production { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): SeriesActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): SeriesActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! description: String title: String! } diff --git a/packages/graphql/tests/schema/federation.test.ts b/packages/graphql/tests/schema/federation.test.ts index 8a4ab3ae96..252eef0b12 100644 --- a/packages/graphql/tests/schema/federation.test.ts +++ b/packages/graphql/tests/schema/federation.test.ts @@ -114,8 +114,8 @@ describe("Apollo Federation", () => { type Post { author: User! - authorAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: UserWhere): PostUserAuthorAggregationSelection - authorConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! + authorAggregate(where: UserWhere): PostUserAuthorAggregationSelection + authorConnection(after: String, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! content: String! } @@ -339,9 +339,9 @@ describe("Apollo Federation", () => { type User @shareable { name: String! - posts(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PostOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PostSort!], where: PostWhere): [Post!]! - postsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: PostWhere): UserPostPostsAggregationSelection - postsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! + posts(limit: Int, offset: Int, options: PostOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PostSort!], where: PostWhere): [Post!]! + postsAggregate(where: PostWhere): UserPostPostsAggregationSelection + postsConnection(after: String, first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! } type UserAggregateSelection @shareable { @@ -654,8 +654,8 @@ describe("Apollo Federation", () => { type Post { author: User! - authorAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: UserWhere): PostUserAuthorAggregationSelection - authorConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! + authorAggregate(where: UserWhere): PostUserAuthorAggregationSelection + authorConnection(after: String, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! content: String! } diff --git a/packages/graphql/tests/schema/inheritance.test.ts b/packages/graphql/tests/schema/inheritance.test.ts index ccf7564c1a..1760db7474 100644 --- a/packages/graphql/tests/schema/inheritance.test.ts +++ b/packages/graphql/tests/schema/inheritance.test.ts @@ -59,9 +59,9 @@ describe("inheritance", () => { directive @customDirectiveObj on OBJECT type Actor implements Person @customDirectiveObj { - friends(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - friendsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: PersonWhere): ActorPersonFriendsAggregationSelection - friendsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [PersonFriendsConnectionSort!], where: PersonFriendsConnectionWhere): PersonFriendsConnection! + friends(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! + friendsAggregate(where: PersonWhere): ActorPersonFriendsAggregationSelection + friendsConnection(after: String, first: Int, sort: [PersonFriendsConnectionSort!], where: PersonFriendsConnectionWhere): PersonFriendsConnection! name: String } diff --git a/packages/graphql/tests/schema/interface-relationships.test.ts b/packages/graphql/tests/schema/interface-relationships.test.ts index 568e770a0d..98de6ad8c7 100644 --- a/packages/graphql/tests/schema/interface-relationships.test.ts +++ b/packages/graphql/tests/schema/interface-relationships.test.ts @@ -119,9 +119,9 @@ describe("Interface Relationships", () => { } type Actor { - actedIn(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - actedInAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ProductionWhere): ActorProductionActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! + actedInAggregate(where: ProductionWhere): ActorProductionActedInAggregationSelection + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -746,9 +746,9 @@ describe("Interface Relationships", () => { } type Actor { - actedIn(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - actedInAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ProductionWhere): ActorProductionActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! + actedInAggregate(where: ProductionWhere): ActorProductionActedInAggregationSelection + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -999,9 +999,9 @@ describe("Interface Relationships", () => { type Episode { runtime: Int! - series(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): Series! - seriesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: SeriesWhere): EpisodeSeriesSeriesAggregationSelection - seriesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [EpisodeSeriesConnectionSort!], where: EpisodeSeriesConnectionWhere): EpisodeSeriesConnection! + series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): Series! + seriesAggregate(where: SeriesWhere): EpisodeSeriesSeriesAggregationSelection + seriesConnection(after: String, first: Int, sort: [EpisodeSeriesConnectionSort!], where: EpisodeSeriesConnectionWhere): EpisodeSeriesConnection! } type EpisodeAggregateSelection { @@ -1211,9 +1211,9 @@ describe("Interface Relationships", () => { } type Movie implements Production { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! runtime: Int! title: String! } @@ -1684,13 +1684,13 @@ describe("Interface Relationships", () => { } type Series implements Production { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): SeriesActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): SeriesActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! episodeCount: Int! - episodes(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: EpisodeOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [EpisodeSort!], where: EpisodeWhere): [Episode!]! - episodesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: EpisodeWhere): SeriesEpisodeEpisodesAggregationSelection - episodesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [SeriesEpisodesConnectionSort!], where: SeriesEpisodesConnectionWhere): SeriesEpisodesConnection! + episodes(limit: Int, offset: Int, options: EpisodeOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [EpisodeSort!], where: EpisodeWhere): [Episode!]! + episodesAggregate(where: EpisodeWhere): SeriesEpisodeEpisodesAggregationSelection + episodesConnection(after: String, first: Int, sort: [SeriesEpisodesConnectionSort!], where: SeriesEpisodesConnectionWhere): SeriesEpisodesConnection! title: String! } @@ -2173,9 +2173,9 @@ describe("Interface Relationships", () => { } type Actor { - actedIn(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - actedInAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ProductionWhere): ActorProductionActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! + actedInAggregate(where: ProductionWhere): ActorProductionActedInAggregationSelection + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -2426,9 +2426,9 @@ describe("Interface Relationships", () => { type Episode { runtime: Int! - series(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): Series! - seriesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: SeriesWhere): EpisodeSeriesSeriesAggregationSelection - seriesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [EpisodeSeriesConnectionSort!], where: EpisodeSeriesConnectionWhere): EpisodeSeriesConnection! + series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): Series! + seriesAggregate(where: SeriesWhere): EpisodeSeriesSeriesAggregationSelection + seriesConnection(after: String, first: Int, sort: [EpisodeSeriesConnectionSort!], where: EpisodeSeriesConnectionWhere): EpisodeSeriesConnection! } type EpisodeAggregateSelection { @@ -2638,9 +2638,9 @@ describe("Interface Relationships", () => { } type Movie implements Production { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! runtime: Int! title: String! } @@ -3131,13 +3131,13 @@ describe("Interface Relationships", () => { } type Series implements Production { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): SeriesActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): SeriesActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! episodeCount: Int! - episodes(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: EpisodeOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [EpisodeSort!], where: EpisodeWhere): [Episode!]! - episodesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: EpisodeWhere): SeriesEpisodeEpisodesAggregationSelection - episodesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [SeriesEpisodesConnectionSort!], where: SeriesEpisodesConnectionWhere): SeriesEpisodesConnection! + episodes(limit: Int, offset: Int, options: EpisodeOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [EpisodeSort!], where: EpisodeWhere): [Episode!]! + episodesAggregate(where: EpisodeWhere): SeriesEpisodeEpisodesAggregationSelection + episodesConnection(after: String, first: Int, sort: [SeriesEpisodesConnectionSort!], where: SeriesEpisodesConnectionWhere): SeriesEpisodesConnection! title: String! } @@ -3988,9 +3988,9 @@ describe("Interface Relationships", () => { type Type1 { field1: String! - interface1(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: Interface1Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Interface1Sort!], where: Interface1Where): [Interface1!]! - interface1Aggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: Interface1Where): Type1Interface1Interface1AggregationSelection - interface1Connection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [Type1Interface1ConnectionSort!], where: Type1Interface1ConnectionWhere): Type1Interface1Connection! + interface1(limit: Int, offset: Int, options: Interface1Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Interface1Sort!], where: Interface1Where): [Interface1!]! + interface1Aggregate(where: Interface1Where): Type1Interface1Interface1AggregationSelection + interface1Connection(after: String, first: Int, sort: [Type1Interface1ConnectionSort!], where: Type1Interface1ConnectionWhere): Type1Interface1Connection! } type Type1AggregateSelection { @@ -4014,9 +4014,9 @@ describe("Interface Relationships", () => { type Type1Interface1 implements Interface1 { field1: String! - interface2(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: Interface2Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Interface2Sort!], where: Interface2Where): [Interface2!]! - interface2Aggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: Interface2Where): Type1Interface1Interface2Interface2AggregationSelection - interface2Connection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! + interface2(limit: Int, offset: Int, options: Interface2Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Interface2Sort!], where: Interface2Where): [Interface2!]! + interface2Aggregate(where: Interface2Where): Type1Interface1Interface2Interface2AggregationSelection + interface2Connection(after: String, first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! } input Type1Interface1AggregateInput { @@ -4411,9 +4411,9 @@ describe("Interface Relationships", () => { type Type2Interface1 implements Interface1 { field1: String! - interface2(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: Interface2Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Interface2Sort!], where: Interface2Where): [Interface2!]! - interface2Aggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: Interface2Where): Type2Interface1Interface2Interface2AggregationSelection - interface2Connection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! + interface2(limit: Int, offset: Int, options: Interface2Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Interface2Sort!], where: Interface2Where): [Interface2!]! + interface2Aggregate(where: Interface2Where): Type2Interface1Interface2Interface2AggregationSelection + interface2Connection(after: String, first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! } type Type2Interface1AggregateSelection { @@ -5226,9 +5226,9 @@ describe("Interface Relationships", () => { type Type1 { field1: String! - interface1(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: Interface1Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Interface1Sort!], where: Interface1Where): [Interface1!]! - interface1Aggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: Interface1Where): Type1Interface1Interface1AggregationSelection - interface1Connection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [Type1Interface1ConnectionSort!], where: Type1Interface1ConnectionWhere): Type1Interface1Connection! + interface1(limit: Int, offset: Int, options: Interface1Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Interface1Sort!], where: Interface1Where): [Interface1!]! + interface1Aggregate(where: Interface1Where): Type1Interface1Interface1AggregationSelection + interface1Connection(after: String, first: Int, sort: [Type1Interface1ConnectionSort!], where: Type1Interface1ConnectionWhere): Type1Interface1Connection! } type Type1AggregateSelection { @@ -5252,9 +5252,9 @@ describe("Interface Relationships", () => { type Type1Interface1 implements Interface1 { field1: String! - interface2(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: Interface2Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Interface2Sort!], where: Interface2Where): [Interface2!]! - interface2Aggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: Interface2Where): Type1Interface1Interface2Interface2AggregationSelection - interface2Connection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! + interface2(limit: Int, offset: Int, options: Interface2Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Interface2Sort!], where: Interface2Where): [Interface2!]! + interface2Aggregate(where: Interface2Where): Type1Interface1Interface2Interface2AggregationSelection + interface2Connection(after: String, first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! } input Type1Interface1AggregateInput { @@ -5658,9 +5658,9 @@ describe("Interface Relationships", () => { type Type2Interface1 implements Interface1 { field1: String! - interface2(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: Interface2Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Interface2Sort!], where: Interface2Where): [Interface2!]! - interface2Aggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: Interface2Where): Type2Interface1Interface2Interface2AggregationSelection - interface2Connection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! + interface2(limit: Int, offset: Int, options: Interface2Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Interface2Sort!], where: Interface2Where): [Interface2!]! + interface2Aggregate(where: Interface2Where): Type2Interface1Interface2Interface2AggregationSelection + interface2Connection(after: String, first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! } type Type2Interface1AggregateSelection { @@ -6446,9 +6446,9 @@ describe("Interface Relationships", () => { type Type1 { field1: String! - interface1(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: Interface1Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Interface1Sort!], where: Interface1Where): [Interface1!]! - interface1Aggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: Interface1Where): Type1Interface1Interface1AggregationSelection - interface1Connection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [Type1Interface1ConnectionSort!], where: Type1Interface1ConnectionWhere): Type1Interface1Connection! + interface1(limit: Int, offset: Int, options: Interface1Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Interface1Sort!], where: Interface1Where): [Interface1!]! + interface1Aggregate(where: Interface1Where): Type1Interface1Interface1AggregationSelection + interface1Connection(after: String, first: Int, sort: [Type1Interface1ConnectionSort!], where: Type1Interface1ConnectionWhere): Type1Interface1Connection! } type Type1AggregateSelection { @@ -6472,9 +6472,9 @@ describe("Interface Relationships", () => { type Type1Interface1 implements Interface1 { field1: String! - interface2(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: Interface2Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Interface2Sort!], where: Interface2Where): [Interface2!]! - interface2Aggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: Interface2Where): Type1Interface1Interface2Interface2AggregationSelection - interface2Connection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! + interface2(limit: Int, offset: Int, options: Interface2Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Interface2Sort!], where: Interface2Where): [Interface2!]! + interface2Aggregate(where: Interface2Where): Type1Interface1Interface2Interface2AggregationSelection + interface2Connection(after: String, first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! } input Type1Interface1AggregateInput { @@ -6939,9 +6939,9 @@ describe("Interface Relationships", () => { type Type2Interface1 implements Interface1 { field1: String! - interface2(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: Interface2Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Interface2Sort!], where: Interface2Where): [Interface2!]! - interface2Aggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: Interface2Where): Type2Interface1Interface2Interface2AggregationSelection - interface2Connection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! + interface2(limit: Int, offset: Int, options: Interface2Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Interface2Sort!], where: Interface2Where): [Interface2!]! + interface2Aggregate(where: Interface2Where): Type2Interface1Interface2Interface2AggregationSelection + interface2Connection(after: String, first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! } type Type2Interface1AggregateSelection { @@ -7320,13 +7320,13 @@ describe("Interface Relationships", () => { type Comment implements Content { content: String - creator(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): User! - creatorAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: UserWhere): CommentUserCreatorAggregationSelection - creatorConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ContentCreatorConnectionSort!], where: ContentCreatorConnectionWhere): ContentCreatorConnection! + creator(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): User! + creatorAggregate(where: UserWhere): CommentUserCreatorAggregationSelection + creatorConnection(after: String, first: Int, sort: [ContentCreatorConnectionSort!], where: ContentCreatorConnectionWhere): ContentCreatorConnection! id: ID - post(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PostOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PostSort!], where: PostWhere): Post! - postAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: PostWhere): CommentPostPostAggregationSelection - postConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [CommentPostConnectionSort!], where: CommentPostConnectionWhere): CommentPostConnection! + post(limit: Int, offset: Int, options: PostOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PostSort!], where: PostWhere): Post! + postAggregate(where: PostWhere): CommentPostPostAggregationSelection + postConnection(after: String, first: Int, sort: [CommentPostConnectionSort!], where: CommentPostConnectionWhere): CommentPostConnection! } type CommentAggregateSelection { @@ -7864,13 +7864,13 @@ describe("Interface Relationships", () => { } type Post implements Content { - comments(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: CommentOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [CommentSort!], where: CommentWhere): [Comment!]! - commentsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: CommentWhere): PostCommentCommentsAggregationSelection - commentsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [PostCommentsConnectionSort!], where: PostCommentsConnectionWhere): PostCommentsConnection! + comments(limit: Int, offset: Int, options: CommentOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [CommentSort!], where: CommentWhere): [Comment!]! + commentsAggregate(where: CommentWhere): PostCommentCommentsAggregationSelection + commentsConnection(after: String, first: Int, sort: [PostCommentsConnectionSort!], where: PostCommentsConnectionWhere): PostCommentsConnection! content: String - creator(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): User! - creatorAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: UserWhere): PostUserCreatorAggregationSelection - creatorConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ContentCreatorConnectionSort!], where: ContentCreatorConnectionWhere): ContentCreatorConnection! + creator(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): User! + creatorAggregate(where: UserWhere): PostUserCreatorAggregationSelection + creatorConnection(after: String, first: Int, sort: [ContentCreatorConnectionSort!], where: ContentCreatorConnectionWhere): ContentCreatorConnection! id: ID } @@ -8235,9 +8235,9 @@ describe("Interface Relationships", () => { } type User { - content(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ContentOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ContentSort!], where: ContentWhere): [Content!]! - contentAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ContentWhere): UserContentContentAggregationSelection - contentConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [UserContentConnectionSort!], where: UserContentConnectionWhere): UserContentConnection! + content(limit: Int, offset: Int, options: ContentOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ContentSort!], where: ContentWhere): [Content!]! + contentAggregate(where: ContentWhere): UserContentContentAggregationSelection + contentConnection(after: String, first: Int, sort: [UserContentConnectionSort!], where: UserContentConnectionWhere): UserContentConnection! id: ID name: String } @@ -8572,9 +8572,9 @@ describe("Interface Relationships", () => { } type Actor { - actedIn(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ShowOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ShowSort!], where: ShowWhere): [Show!]! - actedInAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ShowWhere): ActorShowActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, options: ShowOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ShowSort!], where: ShowWhere): [Show!]! + actedInAggregate(where: ShowWhere): ActorShowActedInAggregationSelection + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -8826,9 +8826,9 @@ describe("Interface Relationships", () => { } type Movie implements Production & Show { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ShowActorsConnectionSort!], where: ShowActorsConnectionWhere): ShowActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [ShowActorsConnectionSort!], where: ShowActorsConnectionWhere): ShowActorsConnection! runtime: Int! title: String! } @@ -9102,9 +9102,9 @@ describe("Interface Relationships", () => { } type Series implements Production & Show { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): SeriesActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ShowActorsConnectionSort!], where: ShowActorsConnectionWhere): ShowActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): SeriesActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [ShowActorsConnectionSort!], where: ShowActorsConnectionWhere): ShowActorsConnection! episodeCount: Int! title: String! } diff --git a/packages/graphql/tests/schema/interfaces.test.ts b/packages/graphql/tests/schema/interfaces.test.ts index 59112d0474..61ab4dc60d 100644 --- a/packages/graphql/tests/schema/interfaces.test.ts +++ b/packages/graphql/tests/schema/interfaces.test.ts @@ -83,9 +83,9 @@ describe("Interfaces", () => { type Movie implements MovieNode { customQuery: [Movie] id: ID - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): MovieMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieNodeMoviesConnectionSort!], where: MovieNodeMoviesConnectionWhere): MovieNodeMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [MovieNodeMoviesConnectionSort!], where: MovieNodeMoviesConnectionWhere): MovieNodeMoviesConnection! nodes: [MovieNode] } @@ -502,9 +502,9 @@ describe("Interfaces", () => { type Movie implements MovieNode { customQuery: [Movie] id: ID - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): MovieMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieNodeMoviesConnectionSort!], where: MovieNodeMoviesConnectionWhere): MovieNodeMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [MovieNodeMoviesConnectionSort!], where: MovieNodeMoviesConnectionWhere): MovieNodeMoviesConnection! nodes: [MovieNode] } diff --git a/packages/graphql/tests/schema/issues/1182.test.ts b/packages/graphql/tests/schema/issues/1182.test.ts index 47e6a53e7c..90464c6306 100644 --- a/packages/graphql/tests/schema/issues/1182.test.ts +++ b/packages/graphql/tests/schema/issues/1182.test.ts @@ -180,9 +180,9 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID! title: String! } diff --git a/packages/graphql/tests/schema/issues/1614.test.ts b/packages/graphql/tests/schema/issues/1614.test.ts index 7a52cb9910..5bb43f19b1 100644 --- a/packages/graphql/tests/schema/issues/1614.test.ts +++ b/packages/graphql/tests/schema/issues/1614.test.ts @@ -72,9 +72,9 @@ describe("https://github.com/neo4j/graphql/issues/1614", () => { } type CrewMember { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): Movie! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): CrewMemberMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [CrewMemberMoviesConnectionSort!], where: CrewMemberMoviesConnectionWhere): CrewMemberMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): Movie! + moviesAggregate(where: MovieWhere): CrewMemberMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [CrewMemberMoviesConnectionSort!], where: CrewMemberMoviesConnectionWhere): CrewMemberMoviesConnection! } type CrewMemberAggregateSelection { diff --git a/packages/graphql/tests/schema/issues/162.test.ts b/packages/graphql/tests/schema/issues/162.test.ts index 7a2d4e4c74..d674893bae 100644 --- a/packages/graphql/tests/schema/issues/162.test.ts +++ b/packages/graphql/tests/schema/issues/162.test.ts @@ -155,9 +155,9 @@ describe("162", () => { type TigerJawLevel2 { id: ID - part1(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: TigerJawLevel2Part1Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [TigerJawLevel2Part1Sort!], where: TigerJawLevel2Part1Where): TigerJawLevel2Part1! - part1Aggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: TigerJawLevel2Part1Where): TigerJawLevel2TigerJawLevel2Part1Part1AggregationSelection - part1Connection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [TigerJawLevel2Part1ConnectionSort!], where: TigerJawLevel2Part1ConnectionWhere): TigerJawLevel2Part1Connection! + part1(limit: Int, offset: Int, options: TigerJawLevel2Part1Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [TigerJawLevel2Part1Sort!], where: TigerJawLevel2Part1Where): TigerJawLevel2Part1! + part1Aggregate(where: TigerJawLevel2Part1Where): TigerJawLevel2TigerJawLevel2Part1Part1AggregationSelection + part1Connection(after: String, first: Int, sort: [TigerJawLevel2Part1ConnectionSort!], where: TigerJawLevel2Part1ConnectionWhere): TigerJawLevel2Part1Connection! } type TigerJawLevel2AggregateSelection { @@ -190,9 +190,9 @@ describe("162", () => { type TigerJawLevel2Part1 { id: ID - tiger(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: TigerOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [TigerSort!], where: TigerWhere): Tiger! - tigerAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: TigerWhere): TigerJawLevel2Part1TigerTigerAggregationSelection - tigerConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [TigerJawLevel2Part1TigerConnectionSort!], where: TigerJawLevel2Part1TigerConnectionWhere): TigerJawLevel2Part1TigerConnection! + tiger(limit: Int, offset: Int, options: TigerOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [TigerSort!], where: TigerWhere): Tiger! + tigerAggregate(where: TigerWhere): TigerJawLevel2Part1TigerTigerAggregationSelection + tigerConnection(after: String, first: Int, sort: [TigerJawLevel2Part1TigerConnectionSort!], where: TigerJawLevel2Part1TigerConnectionWhere): TigerJawLevel2Part1TigerConnection! } input TigerJawLevel2Part1AggregateInput { diff --git a/packages/graphql/tests/schema/issues/2187.test.ts b/packages/graphql/tests/schema/issues/2187.test.ts index ef423213fe..4ff0e84b3f 100644 --- a/packages/graphql/tests/schema/issues/2187.test.ts +++ b/packages/graphql/tests/schema/issues/2187.test.ts @@ -82,9 +82,9 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { } type Genre { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): GenreMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): GenreMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! name: String } @@ -335,9 +335,9 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { } type Movie { - genres(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): [Genre!]! @deprecated(reason: \\"Do not use genre\\") - genresAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: GenreWhere): MovieGenreGenresAggregationSelection @deprecated(reason: \\"Do not use genre\\") - genresConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! @deprecated(reason: \\"Do not use genre\\") + genres(limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): [Genre!]! @deprecated(reason: \\"Do not use genre\\") + genresAggregate(where: GenreWhere): MovieGenreGenresAggregationSelection @deprecated(reason: \\"Do not use genre\\") + genresConnection(after: String, first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! @deprecated(reason: \\"Do not use genre\\") imdbRating: Float title: String @deprecated(reason: \\"Do not use title\\") year: Int diff --git a/packages/graphql/tests/schema/issues/2377.test.ts b/packages/graphql/tests/schema/issues/2377.test.ts index 1ed94db0b1..8ad8d5e696 100644 --- a/packages/graphql/tests/schema/issues/2377.test.ts +++ b/packages/graphql/tests/schema/issues/2377.test.ts @@ -151,9 +151,9 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { \\"\\"\\" Resources encapsulating the given resource (e.g., a github org contains a repo) \\"\\"\\" - containedBy(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ResourceOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ResourceSort!], where: ResourceWhere): [Resource!]! - containedByAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ResourceWhere): ResourceResourceContainedByAggregationSelection - containedByConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ResourceContainedByConnectionSort!], where: ResourceContainedByConnectionWhere): ResourceContainedByConnection! + containedBy(limit: Int, offset: Int, options: ResourceOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ResourceSort!], where: ResourceWhere): [Resource!]! + containedByAggregate(where: ResourceWhere): ResourceResourceContainedByAggregationSelection + containedByConnection(after: String, first: Int, sort: [ResourceContainedByConnectionSort!], where: ResourceContainedByConnectionWhere): ResourceContainedByConnection! createdAt: DateTime! externalIds: [ID!] id: ID! diff --git a/packages/graphql/tests/schema/issues/2969.test.ts b/packages/graphql/tests/schema/issues/2969.test.ts index 01d7c51948..ab78b3aa2a 100644 --- a/packages/graphql/tests/schema/issues/2969.test.ts +++ b/packages/graphql/tests/schema/issues/2969.test.ts @@ -94,9 +94,9 @@ describe("https://github.com/neo4j/graphql/issues/2969", () => { } type Post { - author(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): User! - authorAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: UserWhere): PostUserAuthorAggregationSelection - authorConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! + author(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): User! + authorAggregate(where: UserWhere): PostUserAuthorAggregationSelection + authorConnection(after: String, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! content: String! } @@ -331,9 +331,9 @@ describe("https://github.com/neo4j/graphql/issues/2969", () => { type User { id: ID! name: String! - posts(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PostOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PostSort!], where: PostWhere): [Post!]! - postsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: PostWhere): UserPostPostsAggregationSelection - postsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! + posts(limit: Int, offset: Int, options: PostOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PostSort!], where: PostWhere): [Post!]! + postsAggregate(where: PostWhere): UserPostPostsAggregationSelection + postsConnection(after: String, first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! } type UserAggregateSelection { diff --git a/packages/graphql/tests/schema/issues/2981.test.ts b/packages/graphql/tests/schema/issues/2981.test.ts index 3fd936dc42..45a2dbfe5a 100644 --- a/packages/graphql/tests/schema/issues/2981.test.ts +++ b/packages/graphql/tests/schema/issues/2981.test.ts @@ -55,8 +55,8 @@ describe("https://github.com/neo4j/graphql/issues/2981", () => { type Book { isbn: String! originalTitle: String! - translatedTitle(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: BookTitleWhere): BookTitle - translatedTitleConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: BookTranslatedTitleConnectionWhere): BookTranslatedTitleConnection! + translatedTitle(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: BookTitleWhere): BookTitle + translatedTitleConnection(after: String, first: Int, where: BookTranslatedTitleConnectionWhere): BookTranslatedTitleConnection! } type BookAggregateSelection { @@ -129,9 +129,9 @@ describe("https://github.com/neo4j/graphql/issues/2981", () => { } type BookTitle_EN { - book(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: BookOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [BookSort!], where: BookWhere): Book! - bookAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: BookWhere): BookTitle_ENBookBookAggregationSelection - bookConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [BookTitle_ENBookConnectionSort!], where: BookTitle_ENBookConnectionWhere): BookTitle_ENBookConnection! + book(limit: Int, offset: Int, options: BookOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [BookSort!], where: BookWhere): Book! + bookAggregate(where: BookWhere): BookTitle_ENBookBookAggregationSelection + bookConnection(after: String, first: Int, sort: [BookTitle_ENBookConnectionSort!], where: BookTitle_ENBookConnectionWhere): BookTitle_ENBookConnection! value: String! } @@ -321,9 +321,9 @@ describe("https://github.com/neo4j/graphql/issues/2981", () => { } type BookTitle_SV { - book(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: BookOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [BookSort!], where: BookWhere): Book! - bookAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: BookWhere): BookTitle_SVBookBookAggregationSelection - bookConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [BookTitle_SVBookConnectionSort!], where: BookTitle_SVBookConnectionWhere): BookTitle_SVBookConnection! + book(limit: Int, offset: Int, options: BookOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [BookSort!], where: BookWhere): Book! + bookAggregate(where: BookWhere): BookTitle_SVBookBookAggregationSelection + bookConnection(after: String, first: Int, sort: [BookTitle_SVBookConnectionSort!], where: BookTitle_SVBookConnectionWhere): BookTitle_SVBookConnection! value: String! } diff --git a/packages/graphql/tests/schema/issues/2993.test.ts b/packages/graphql/tests/schema/issues/2993.test.ts index d8d8a64ffd..eedcc3afa0 100644 --- a/packages/graphql/tests/schema/issues/2993.test.ts +++ b/packages/graphql/tests/schema/issues/2993.test.ts @@ -256,9 +256,9 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { } type User implements Profile { - following(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ProfileOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProfileSort!], where: ProfileWhere): [Profile!]! - followingAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ProfileWhere): UserProfileFollowingAggregationSelection - followingConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [UserFollowingConnectionSort!], where: UserFollowingConnectionWhere): UserFollowingConnection! + following(limit: Int, offset: Int, options: ProfileOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProfileSort!], where: ProfileWhere): [Profile!]! + followingAggregate(where: ProfileWhere): UserProfileFollowingAggregationSelection + followingConnection(after: String, first: Int, sort: [UserFollowingConnectionSort!], where: UserFollowingConnectionWhere): UserFollowingConnection! id: ID! userName: String! } diff --git a/packages/graphql/tests/schema/issues/3428.test.ts b/packages/graphql/tests/schema/issues/3428.test.ts index 444781f623..b75d9dc140 100644 --- a/packages/graphql/tests/schema/issues/3428.test.ts +++ b/packages/graphql/tests/schema/issues/3428.test.ts @@ -76,9 +76,9 @@ describe("Relationship nested operations", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -424,8 +424,8 @@ describe("Relationship nested operations", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } diff --git a/packages/graphql/tests/schema/issues/3439.test.ts b/packages/graphql/tests/schema/issues/3439.test.ts index 7970ac6534..8c1a7e5166 100644 --- a/packages/graphql/tests/schema/issues/3439.test.ts +++ b/packages/graphql/tests/schema/issues/3439.test.ts @@ -114,9 +114,9 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { type Genre { name: String! - product(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: IProductOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [IProductSort!], where: IProductWhere): [IProduct!]! - productAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: IProductWhere): GenreIProductProductAggregationSelection - productConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! + product(limit: Int, offset: Int, options: IProductOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [IProductSort!], where: IProductWhere): [IProduct!]! + productAggregate(where: IProductWhere): GenreIProductProductAggregationSelection + productConnection(after: String, first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! } type GenreAggregateSelection { @@ -497,9 +497,9 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } type Movie implements INode & IProduct { - genre(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): Genre! - genreAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: GenreWhere): MovieGenreGenreAggregationSelection - genreConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! + genre(limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): Genre! + genreAggregate(where: GenreWhere): MovieGenreGenreAggregationSelection + genreConnection(after: String, first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! id: String! name: String! } @@ -758,9 +758,9 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } type Series implements INode & IProduct { - genre(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): Genre! - genreAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: GenreWhere): SeriesGenreGenreAggregationSelection - genreConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [SeriesGenreConnectionSort!], where: SeriesGenreConnectionWhere): SeriesGenreConnection! + genre(limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): Genre! + genreAggregate(where: GenreWhere): SeriesGenreGenreAggregationSelection + genreConnection(after: String, first: Int, sort: [SeriesGenreConnectionSort!], where: SeriesGenreConnectionWhere): SeriesGenreConnection! id: String! name: String! } @@ -1117,9 +1117,9 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { type Genre { name: String! - product(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: IProductOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [IProductSort!], where: IProductWhere): [IProduct!]! - productAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: IProductWhere): GenreIProductProductAggregationSelection - productConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! + product(limit: Int, offset: Int, options: IProductOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [IProductSort!], where: IProductWhere): [IProduct!]! + productAggregate(where: IProductWhere): GenreIProductProductAggregationSelection + productConnection(after: String, first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! } type GenreAggregateSelection { @@ -1446,9 +1446,9 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } type Movie implements IProduct { - genre(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): Genre! - genreAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: GenreWhere): MovieGenreGenreAggregationSelection - genreConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! + genre(limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): Genre! + genreAggregate(where: GenreWhere): MovieGenreGenreAggregationSelection + genreConnection(after: String, first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! id: String! name: String! } @@ -1704,9 +1704,9 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } type Series implements IProduct { - genre(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): Genre! - genreAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: GenreWhere): SeriesGenreGenreAggregationSelection - genreConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [SeriesGenreConnectionSort!], where: SeriesGenreConnectionWhere): SeriesGenreConnection! + genre(limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): Genre! + genreAggregate(where: GenreWhere): SeriesGenreGenreAggregationSelection + genreConnection(after: String, first: Int, sort: [SeriesGenreConnectionSort!], where: SeriesGenreConnectionWhere): SeriesGenreConnection! id: String! name: String! } @@ -2071,9 +2071,9 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { type Genre { name: String! - product(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: IProductOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [IProductSort!], where: IProductWhere): [IProduct!]! - productAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: IProductWhere): GenreIProductProductAggregationSelection - productConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! + product(limit: Int, offset: Int, options: IProductOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [IProductSort!], where: IProductWhere): [IProduct!]! + productAggregate(where: IProductWhere): GenreIProductProductAggregationSelection + productConnection(after: String, first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! } type GenreAggregateSelection { @@ -2589,9 +2589,9 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } type Movie implements IProduct { - genre(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): Genre! - genreAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: GenreWhere): MovieGenreGenreAggregationSelection - genreConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [IProductGenreConnectionSort!], where: IProductGenreConnectionWhere): IProductGenreConnection! + genre(limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): Genre! + genreAggregate(where: GenreWhere): MovieGenreGenreAggregationSelection + genreConnection(after: String, first: Int, sort: [IProductGenreConnectionSort!], where: IProductGenreConnectionWhere): IProductGenreConnection! id: String! name: String! } @@ -2885,9 +2885,9 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } type Series implements IProduct { - genre(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): Genre! - genreAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: GenreWhere): SeriesGenreGenreAggregationSelection - genreConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [IProductGenreConnectionSort!], where: IProductGenreConnectionWhere): IProductGenreConnection! + genre(limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): Genre! + genreAggregate(where: GenreWhere): SeriesGenreGenreAggregationSelection + genreConnection(after: String, first: Int, sort: [IProductGenreConnectionSort!], where: IProductGenreConnectionWhere): IProductGenreConnection! id: String! name: String! } @@ -3302,9 +3302,9 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { type Genre { name: String! - product(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: IProductOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [IProductSort!], where: IProductWhere): [IProduct!]! - productAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: IProductWhere): GenreIProductProductAggregationSelection - productConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! + product(limit: Int, offset: Int, options: IProductOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [IProductSort!], where: IProductWhere): [IProduct!]! + productAggregate(where: IProductWhere): GenreIProductProductAggregationSelection + productConnection(after: String, first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! } type GenreAggregateSelection { @@ -3838,8 +3838,8 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } type Movie implements IProduct { - genre(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: UGenreWhere): UGenre! - genreConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [IProductGenreConnectionSort!], where: IProductGenreConnectionWhere): IProductGenreConnection! + genre(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: UGenreWhere): UGenre! + genreConnection(after: String, first: Int, sort: [IProductGenreConnectionSort!], where: IProductGenreConnectionWhere): IProductGenreConnection! id: String! name: String! } @@ -4116,9 +4116,9 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { type Rating { number: Int! - product(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: IProductOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [IProductSort!], where: IProductWhere): [IProduct!]! - productAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: IProductWhere): RatingIProductProductAggregationSelection - productConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [RatingProductConnectionSort!], where: RatingProductConnectionWhere): RatingProductConnection! + product(limit: Int, offset: Int, options: IProductOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [IProductSort!], where: IProductWhere): [IProduct!]! + productAggregate(where: IProductWhere): RatingIProductProductAggregationSelection + productConnection(after: String, first: Int, sort: [RatingProductConnectionSort!], where: RatingProductConnectionWhere): RatingProductConnection! } type RatingAggregateSelection { @@ -4374,8 +4374,8 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } type Series implements IProduct { - genre(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: UGenreWhere): UGenre! - genreConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [IProductGenreConnectionSort!], where: IProductGenreConnectionWhere): IProductGenreConnection! + genre(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: UGenreWhere): UGenre! + genreConnection(after: String, first: Int, sort: [IProductGenreConnectionSort!], where: IProductGenreConnectionWhere): IProductGenreConnection! id: String! name: String! } diff --git a/packages/graphql/tests/schema/issues/3541.test.ts b/packages/graphql/tests/schema/issues/3541.test.ts index c72afc0073..508ee230ce 100644 --- a/packages/graphql/tests/schema/issues/3541.test.ts +++ b/packages/graphql/tests/schema/issues/3541.test.ts @@ -114,9 +114,9 @@ describe("Extending the schema in when using getSubgraphSchema", () => { } type Movie @key(fields: \\"title\\") @shareable { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String! } @@ -442,9 +442,9 @@ describe("Extending the schema in when using getSubgraphSchema", () => { } type Movie @key(fields: \\"title\\") @key(fields: \\"id\\") @shareable { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID! title: String! } diff --git a/packages/graphql/tests/schema/issues/3698.test.ts b/packages/graphql/tests/schema/issues/3698.test.ts index f4a66d103a..d5e2405ec1 100644 --- a/packages/graphql/tests/schema/issues/3698.test.ts +++ b/packages/graphql/tests/schema/issues/3698.test.ts @@ -107,9 +107,9 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { type Genre { name: String! - product(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: IProductOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [IProductSort!], where: IProductWhere): [IProduct!]! - productAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: IProductWhere): GenreIProductProductAggregationSelection - productConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! + product(limit: Int, offset: Int, options: IProductOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [IProductSort!], where: IProductWhere): [IProduct!]! + productAggregate(where: IProductWhere): GenreIProductProductAggregationSelection + productConnection(after: String, first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! } type GenreAggregateSelection { @@ -460,9 +460,9 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { } type Movie implements IProduct { - genre(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): Genre! - genreAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: GenreWhere): MovieGenreGenreAggregationSelection - genreConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! + genre(limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): Genre! + genreAggregate(where: GenreWhere): MovieGenreGenreAggregationSelection + genreConnection(after: String, first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! id: String! info: String! name: String! @@ -838,9 +838,9 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { type Genre { name: String! - product(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: IProductOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [IProductSort!], where: IProductWhere): [IProduct!]! - productAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: IProductWhere): GenreIProductProductAggregationSelection - productConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! + product(limit: Int, offset: Int, options: IProductOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [IProductSort!], where: IProductWhere): [IProduct!]! + productAggregate(where: IProductWhere): GenreIProductProductAggregationSelection + productConnection(after: String, first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! } type GenreAggregateSelection { @@ -1299,9 +1299,9 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { } type Movie implements IProduct { - genre(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): Genre! - genreAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: GenreWhere): MovieGenreGenreAggregationSelection - genreConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [IProductGenreConnectionSort!], where: IProductGenreConnectionWhere): IProductGenreConnection! + genre(limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): Genre! + genreAggregate(where: GenreWhere): MovieGenreGenreAggregationSelection + genreConnection(after: String, first: Int, sort: [IProductGenreConnectionSort!], where: IProductGenreConnectionWhere): IProductGenreConnection! id: String! info: String! name: String! @@ -1658,9 +1658,9 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { type Genre { name: String! - product(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: IProductOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [IProductSort!], where: IProductWhere): [IProduct!]! - productAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: IProductWhere): GenreIProductProductAggregationSelection - productConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! + product(limit: Int, offset: Int, options: IProductOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [IProductSort!], where: IProductWhere): [IProduct!]! + productAggregate(where: IProductWhere): GenreIProductProductAggregationSelection + productConnection(after: String, first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! } type GenreAggregateSelection { @@ -2121,9 +2121,9 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { } type Movie implements IProduct { - genre(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): Genre! - genreAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: GenreWhere): MovieGenreGenreAggregationSelection - genreConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [IProductGenreConnectionSort!], where: IProductGenreConnectionWhere): IProductGenreConnection! + genre(limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): Genre! + genreAggregate(where: GenreWhere): MovieGenreGenreAggregationSelection + genreConnection(after: String, first: Int, sort: [IProductGenreConnectionSort!], where: IProductGenreConnectionWhere): IProductGenreConnection! id: String! info: String! name: String! @@ -2348,9 +2348,9 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { } type Series implements IProduct { - genre(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): Genre! - genreAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: GenreWhere): SeriesGenreGenreAggregationSelection - genreConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [IProductGenreConnectionSort!], where: IProductGenreConnectionWhere): IProductGenreConnection! + genre(limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): Genre! + genreAggregate(where: GenreWhere): SeriesGenreGenreAggregationSelection + genreConnection(after: String, first: Int, sort: [IProductGenreConnectionSort!], where: IProductGenreConnectionWhere): IProductGenreConnection! id: String! info: String! name: String! diff --git a/packages/graphql/tests/schema/issues/3816.test.ts b/packages/graphql/tests/schema/issues/3816.test.ts index d94fef5ed4..aeb2100456 100644 --- a/packages/graphql/tests/schema/issues/3816.test.ts +++ b/packages/graphql/tests/schema/issues/3816.test.ts @@ -72,9 +72,9 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { } type Genre { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): GenreMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): GenreMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! name: String! } @@ -275,9 +275,9 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { } type Movie { - genre(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): Genre! - genreAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: GenreWhere): MovieGenreGenreAggregationSelection - genreConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! + genre(limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): Genre! + genreAggregate(where: GenreWhere): MovieGenreGenreAggregationSelection + genreConnection(after: String, first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! name: String! } @@ -545,9 +545,9 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { } type Genre { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): GenreMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): GenreMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! name: String! } @@ -734,9 +734,9 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { } type Movie { - genre(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): Genre! - genreAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: GenreWhere): MovieGenreGenreAggregationSelection - genreConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! + genre(limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): Genre! + genreAggregate(where: GenreWhere): MovieGenreGenreAggregationSelection + genreConnection(after: String, first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! name: String! } diff --git a/packages/graphql/tests/schema/issues/3817.test.ts b/packages/graphql/tests/schema/issues/3817.test.ts index e7e21afc6a..4c44b712e4 100644 --- a/packages/graphql/tests/schema/issues/3817.test.ts +++ b/packages/graphql/tests/schema/issues/3817.test.ts @@ -28,12 +28,7 @@ describe("ttps://github.com/neo4j/graphql/issues/3817", () => { type Person @node { id: ID! @id friends: [Person!]! - @relationship( - type: "FRIEND_OF" - direction: OUT - queryDirection: UNDIRECTED_ONLY - properties: "FriendOf" - ) + @relationship(type: "FRIEND_OF", direction: OUT, queryDirection: UNDIRECTED, properties: "FriendOf") } type FriendOf @relationshipProperties { diff --git a/packages/graphql/tests/schema/issues/4511.test.ts b/packages/graphql/tests/schema/issues/4511.test.ts index 47497a21b6..bfe2711afc 100644 --- a/packages/graphql/tests/schema/issues/4511.test.ts +++ b/packages/graphql/tests/schema/issues/4511.test.ts @@ -262,9 +262,9 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { } type Movie implements Production { - director(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: CreatureOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: CreatureWhere): Creature! - directorAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: CreatureWhere): MovieCreatureDirectorAggregationSelection - directorConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: ProductionDirectorConnectionWhere): ProductionDirectorConnection! + director(limit: Int, offset: Int, options: CreatureOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: CreatureWhere): Creature! + directorAggregate(where: CreatureWhere): MovieCreatureDirectorAggregationSelection + directorConnection(after: String, first: Int, where: ProductionDirectorConnectionWhere): ProductionDirectorConnection! id: ID title: String! } @@ -420,9 +420,9 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { } type Person implements Creature { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): Production! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ProductionWhere): PersonProductionMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [CreatureMoviesConnectionSort!], where: CreatureMoviesConnectionWhere): CreatureMoviesConnection! + movies(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): Production! + moviesAggregate(where: ProductionWhere): PersonProductionMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [CreatureMoviesConnectionSort!], where: CreatureMoviesConnectionWhere): CreatureMoviesConnection! } type PersonAggregateSelection { @@ -716,9 +716,9 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { } type Series implements Production { - director(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: CreatureOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: CreatureWhere): Creature! - directorAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: CreatureWhere): SeriesCreatureDirectorAggregationSelection - directorConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: ProductionDirectorConnectionWhere): ProductionDirectorConnection! + director(limit: Int, offset: Int, options: CreatureOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: CreatureWhere): Creature! + directorAggregate(where: CreatureWhere): SeriesCreatureDirectorAggregationSelection + directorConnection(after: String, first: Int, where: ProductionDirectorConnectionWhere): ProductionDirectorConnection! episode: Int! id: ID title: String! diff --git a/packages/graphql/tests/schema/issues/4615.test.ts b/packages/graphql/tests/schema/issues/4615.test.ts index 06c30f2366..8c5142e6e5 100644 --- a/packages/graphql/tests/schema/issues/4615.test.ts +++ b/packages/graphql/tests/schema/issues/4615.test.ts @@ -127,9 +127,9 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { } type Actor { - actedIn(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ShowOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ShowSort!], where: ShowWhere): [Show!]! - actedInAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ShowWhere): ActorShowActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, options: ShowOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ShowSort!], where: ShowWhere): [Show!]! + actedInAggregate(where: ShowWhere): ActorShowActedInAggregationSelection + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -389,9 +389,9 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { } type Movie implements Show { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ShowActorsConnectionSort!], where: ShowActorsConnectionWhere): ShowActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [ShowActorsConnectionSort!], where: ShowActorsConnectionWhere): ShowActorsConnection! release: DateTime! runtime: Int title: String! @@ -619,9 +619,9 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { } type Series implements Show { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): SeriesActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ShowActorsConnectionSort!], where: ShowActorsConnectionWhere): ShowActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): SeriesActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [ShowActorsConnectionSort!], where: ShowActorsConnectionWhere): ShowActorsConnection! episodes: Int title: String! } diff --git a/packages/graphql/tests/schema/issues/872.test.ts b/packages/graphql/tests/schema/issues/872.test.ts index 63aaa764b5..f13024c830 100644 --- a/packages/graphql/tests/schema/issues/872.test.ts +++ b/packages/graphql/tests/schema/issues/872.test.ts @@ -50,16 +50,16 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { } type Actor { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! name: String! } type Actor2 { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): Actor2MovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [Actor2MoviesConnectionSort!], where: Actor2MoviesConnectionWhere): Actor2MoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): Actor2MovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [Actor2MoviesConnectionSort!], where: Actor2MoviesConnectionWhere): Actor2MoviesConnection! name: String! } diff --git a/packages/graphql/tests/schema/lowercase-type-names.test.ts b/packages/graphql/tests/schema/lowercase-type-names.test.ts index 950d05dc34..df15ec4cd3 100644 --- a/packages/graphql/tests/schema/lowercase-type-names.test.ts +++ b/packages/graphql/tests/schema/lowercase-type-names.test.ts @@ -164,9 +164,9 @@ describe("lower case type names", () => { type actor { createdAt: DateTime - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: movieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [movieSort!], where: movieWhere): [movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: movieWhere): actormovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [actorMoviesConnectionSort!], where: actorMoviesConnectionWhere): actorMoviesConnection! + movies(limit: Int, offset: Int, options: movieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [movieSort!], where: movieWhere): [movie!]! + moviesAggregate(where: movieWhere): actormovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [actorMoviesConnectionSort!], where: actorMoviesConnectionWhere): actorMoviesConnection! name: String year: Int } @@ -435,9 +435,9 @@ describe("lower case type names", () => { } type movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: actorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [actorSort!], where: actorWhere): [actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: actorWhere): movieactorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [movieActorsConnectionSort!], where: movieActorsConnectionWhere): movieActorsConnection! + actors(limit: Int, offset: Int, options: actorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [actorSort!], where: actorWhere): [actor!]! + actorsAggregate(where: actorWhere): movieactorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [movieActorsConnectionSort!], where: movieActorsConnectionWhere): movieActorsConnection! createdAt: DateTime name: String testId: String diff --git a/packages/graphql/tests/schema/math.test.ts b/packages/graphql/tests/schema/math.test.ts index 8d0acf5ee2..c9a39f93de 100644 --- a/packages/graphql/tests/schema/math.test.ts +++ b/packages/graphql/tests/schema/math.test.ts @@ -568,9 +568,9 @@ describe("Algebraic", () => { } type Director { - directs(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - directsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): DirectorMovieDirectsAggregationSelection - directsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [DirectorDirectsConnectionSort!], where: DirectorDirectsConnectionWhere): DirectorDirectsConnection! + directs(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + directsAggregate(where: MovieWhere): DirectorMovieDirectsAggregationSelection + directsConnection(after: String, first: Int, sort: [DirectorDirectsConnectionSort!], where: DirectorDirectsConnectionWhere): DirectorDirectsConnection! lastName: String! } @@ -800,9 +800,9 @@ describe("Algebraic", () => { } type Movie { - directedBy(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: DirectorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [DirectorSort!], where: DirectorWhere): Director - directedByAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: DirectorWhere): MovieDirectorDirectedByAggregationSelection - directedByConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieDirectedByConnectionSort!], where: MovieDirectedByConnectionWhere): MovieDirectedByConnection! + directedBy(limit: Int, offset: Int, options: DirectorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [DirectorSort!], where: DirectorWhere): Director + directedByAggregate(where: DirectorWhere): MovieDirectorDirectedByAggregationSelection + directedByConnection(after: String, first: Int, sort: [MovieDirectedByConnectionSort!], where: MovieDirectedByConnectionWhere): MovieDirectedByConnection! id: ID viewers: Int! } @@ -1122,9 +1122,9 @@ describe("Algebraic", () => { type Movie implements Production { id: ID viewers: Int! - workers(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - workersAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: PersonWhere): MoviePersonWorkersAggregationSelection - workersConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieWorkersConnectionSort!], where: MovieWorkersConnectionWhere): MovieWorkersConnection! + workers(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! + workersAggregate(where: PersonWhere): MoviePersonWorkersAggregationSelection + workersConnection(after: String, first: Int, sort: [MovieWorkersConnectionSort!], where: MovieWorkersConnectionWhere): MovieWorkersConnection! } type MovieAggregateSelection { @@ -1350,9 +1350,9 @@ describe("Algebraic", () => { type Person { name: String! - worksInProduction(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - worksInProductionAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ProductionWhere): PersonProductionWorksInProductionAggregationSelection - worksInProductionConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [PersonWorksInProductionConnectionSort!], where: PersonWorksInProductionConnectionWhere): PersonWorksInProductionConnection! + worksInProduction(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! + worksInProductionAggregate(where: ProductionWhere): PersonProductionWorksInProductionAggregationSelection + worksInProductionConnection(after: String, first: Int, sort: [PersonWorksInProductionConnectionSort!], where: PersonWorksInProductionConnectionWhere): PersonWorksInProductionConnection! } type PersonAggregateSelection { @@ -1796,9 +1796,9 @@ describe("Algebraic", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: PersonWhere): MoviePersonActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! + actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String! } @@ -2035,9 +2035,9 @@ describe("Algebraic", () => { } type Person { - actedInMovies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - actedInMoviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): PersonMovieActedInMoviesAggregationSelection - actedInMoviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [PersonActedInMoviesConnectionSort!], where: PersonActedInMoviesConnectionWhere): PersonActedInMoviesConnection! + actedInMovies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + actedInMoviesAggregate(where: MovieWhere): PersonMovieActedInMoviesAggregationSelection + actedInMoviesConnection(after: String, first: Int, sort: [PersonActedInMoviesConnectionSort!], where: PersonActedInMoviesConnectionWhere): PersonActedInMoviesConnection! name: String! } diff --git a/packages/graphql/tests/schema/nested-aggregation-on-type.test.ts b/packages/graphql/tests/schema/nested-aggregation-on-type.test.ts index 69c26d3c53..a357c8d671 100644 --- a/packages/graphql/tests/schema/nested-aggregation-on-type.test.ts +++ b/packages/graphql/tests/schema/nested-aggregation-on-type.test.ts @@ -92,9 +92,9 @@ describe("nested aggregation on interface", () => { } type Actor { - actedIn(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - actedInAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + actedInAggregate(where: MovieWhere): ActorMovieActedInAggregationSelection + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } diff --git a/packages/graphql/tests/schema/pluralize-consistency.test.ts b/packages/graphql/tests/schema/pluralize-consistency.test.ts index 77daafe537..4a407c5777 100644 --- a/packages/graphql/tests/schema/pluralize-consistency.test.ts +++ b/packages/graphql/tests/schema/pluralize-consistency.test.ts @@ -195,9 +195,9 @@ describe("Pluralize consistency", () => { } type super_user { - my_friend(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: super_friendOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [super_friendSort!], where: super_friendWhere): [super_friend!]! - my_friendAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: super_friendWhere): super_usersuper_friendMy_friendAggregationSelection - my_friendConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [super_userMy_friendConnectionSort!], where: super_userMy_friendConnectionWhere): super_userMy_friendConnection! + my_friend(limit: Int, offset: Int, options: super_friendOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [super_friendSort!], where: super_friendWhere): [super_friend!]! + my_friendAggregate(where: super_friendWhere): super_usersuper_friendMy_friendAggregationSelection + my_friendConnection(after: String, first: Int, sort: [super_userMy_friendConnectionSort!], where: super_userMy_friendConnectionWhere): super_userMy_friendConnection! name: String! } diff --git a/packages/graphql/tests/schema/remove-deprecated/array-methods.test.ts b/packages/graphql/tests/schema/remove-deprecated/array-methods.test.ts index 2945822b54..bd52572c3d 100644 --- a/packages/graphql/tests/schema/remove-deprecated/array-methods.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/array-methods.test.ts @@ -85,9 +85,9 @@ describe("Arrays Methods", () => { } type Actor { - actedIn(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - actedInAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + actedInAggregate(where: MovieWhere): ActorMovieActedInAggregationSelection + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String } @@ -349,9 +349,9 @@ describe("Arrays Methods", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! averageRating: Float! id: ID! ratings: [Float!]! diff --git a/packages/graphql/tests/schema/remove-deprecated/comments.test.ts b/packages/graphql/tests/schema/remove-deprecated/comments.test.ts index 28a9134e41..129315bb6e 100644 --- a/packages/graphql/tests/schema/remove-deprecated/comments.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/comments.test.ts @@ -393,9 +393,9 @@ describe("Comments", () => { type Movie { \\"\\"\\"Actors in Movie\\"\\"\\" - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -742,9 +742,9 @@ describe("Comments", () => { type Actor { \\"\\"\\"Acted in Production\\"\\"\\" - actedIn(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - actedInAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ProductionWhere): ActorProductionActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! + actedInAggregate(where: ProductionWhere): ActorProductionActedInAggregationSelection + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -1380,8 +1380,8 @@ describe("Comments", () => { type Movie { id: ID - search(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: SearchWhere): [Search!]! - searchConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: MovieSearchConnectionWhere): MovieSearchConnection! + search(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: SearchWhere): [Search!]! + searchConnection(after: String, first: Int, where: MovieSearchConnectionWhere): MovieSearchConnection! searchNoDirective: Search } diff --git a/packages/graphql/tests/schema/remove-deprecated/directed-argument.test.ts b/packages/graphql/tests/schema/remove-deprecated/directed-argument.test.ts deleted file mode 100644 index cc4cfa6a54..0000000000 --- a/packages/graphql/tests/schema/remove-deprecated/directed-argument.test.ts +++ /dev/null @@ -1,835 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { printSchemaWithDirectives } from "@graphql-tools/utils"; -import { gql } from "graphql-tag"; -import { lexicographicSortSchema } from "graphql/utilities"; -import { Neo4jGraphQL } from "../../../src"; - -describe("Deprecated directed argument", () => { - test("should remove the directed argument", async () => { - const typeDefs = gql` - type Actor @node { - name: String! - movies: [Movie!]! - @relationship( - type: "ACTED_IN" - direction: OUT - properties: "ActedIn" - queryDirection: DEFAULT_UNDIRECTED - ) - } - - type Movie implements Production @node { - title: String! - actors: [Actor!]! - @relationship( - type: "ACTED_IN" - direction: IN - properties: "ActedIn" - queryDirection: DEFAULT_DIRECTED - ) - } - - type ActedIn @relationshipProperties { - screenTime: Int! - startDate: Date! - leadRole: Boolean! - } - union Search = Movie | Genre - - type Genre @node { - id: ID - } - - interface Production { - title: String! - } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - features: { - excludeDeprecatedFields: { - directedArgument: true, - }, - }, - }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\" - The edge properties for the following fields: - * Actor.movies - * Movie.actors - \\"\\"\\" - type ActedIn { - leadRole: Boolean! - screenTime: Int! - startDate: Date! - } - - input ActedInAggregationWhereInput { - AND: [ActedInAggregationWhereInput!] - NOT: ActedInAggregationWhereInput - OR: [ActedInAggregationWhereInput!] - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_MAX_EQUAL: Int - screenTime_MAX_GT: Int - screenTime_MAX_GTE: Int - screenTime_MAX_LT: Int - screenTime_MAX_LTE: Int - screenTime_MIN_EQUAL: Int - screenTime_MIN_GT: Int - screenTime_MIN_GTE: Int - screenTime_MIN_LT: Int - screenTime_MIN_LTE: Int - screenTime_SUM_EQUAL: Int - screenTime_SUM_GT: Int - screenTime_SUM_GTE: Int - screenTime_SUM_LT: Int - screenTime_SUM_LTE: Int - } - - input ActedInCreateInput { - leadRole: Boolean! - screenTime: Int! - startDate: Date! - } - - input ActedInSort { - leadRole: SortDirection - screenTime: SortDirection - startDate: SortDirection - } - - input ActedInUpdateInput { - leadRole: Boolean - screenTime: Int - screenTime_DECREMENT: Int - screenTime_INCREMENT: Int - startDate: Date - } - - input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - leadRole: Boolean @deprecated(reason: \\"Please use the explicit _EQ version\\") - leadRole_EQ: Boolean - screenTime: Int @deprecated(reason: \\"Please use the explicit _EQ version\\") - screenTime_EQ: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int - startDate: Date @deprecated(reason: \\"Please use the explicit _EQ version\\") - startDate_EQ: Date - startDate_GT: Date - startDate_GTE: Date - startDate_IN: [Date!] - startDate_LT: Date - startDate_LTE: Date - } - - type Actor { - movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! - name: String! - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - - input ActorConnectInput { - movies: [ActorMoviesConnectFieldInput!] - } - - input ActorConnectWhere { - node: ActorWhere! - } - - input ActorCreateInput { - movies: ActorMoviesFieldInput - name: String! - } - - input ActorDeleteInput { - movies: [ActorMoviesDeleteFieldInput!] - } - - input ActorDisconnectInput { - movies: [ActorMoviesDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - type ActorMovieMoviesAggregationSelection { - count: Int! - edge: ActorMovieMoviesEdgeAggregateSelection - node: ActorMovieMoviesNodeAggregateSelection - } - - type ActorMovieMoviesEdgeAggregateSelection { - screenTime: IntAggregateSelection! - } - - type ActorMovieMoviesNodeAggregateSelection { - title: StringAggregateSelection! - } - - input ActorMoviesAggregateInput { - AND: [ActorMoviesAggregateInput!] - NOT: ActorMoviesAggregateInput - OR: [ActorMoviesAggregateInput!] - count: Int @deprecated(reason: \\"Please use the explicit _EQ version\\") - count_EQ: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: ActedInAggregationWhereInput - node: ActorMoviesNodeAggregationWhereInput - } - - input ActorMoviesConnectFieldInput { - connect: [MovieConnectInput!] - edge: ActedInCreateInput! - where: MovieConnectWhere - } - - type ActorMoviesConnection { - edges: [ActorMoviesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorMoviesConnectionSort { - edge: ActedInSort - node: MovieSort - } - - input ActorMoviesConnectionWhere { - AND: [ActorMoviesConnectionWhere!] - NOT: ActorMoviesConnectionWhere - OR: [ActorMoviesConnectionWhere!] - edge: ActedInWhere - node: MovieWhere - } - - input ActorMoviesCreateFieldInput { - edge: ActedInCreateInput! - node: MovieCreateInput! - } - - input ActorMoviesDeleteFieldInput { - delete: MovieDeleteInput - where: ActorMoviesConnectionWhere - } - - input ActorMoviesDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: ActorMoviesConnectionWhere - } - - input ActorMoviesFieldInput { - connect: [ActorMoviesConnectFieldInput!] - create: [ActorMoviesCreateFieldInput!] - } - - input ActorMoviesNodeAggregationWhereInput { - AND: [ActorMoviesNodeAggregationWhereInput!] - NOT: ActorMoviesNodeAggregationWhereInput - OR: [ActorMoviesNodeAggregationWhereInput!] - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int - } - - type ActorMoviesRelationship { - cursor: String! - node: Movie! - properties: ActedIn! - } - - input ActorMoviesUpdateConnectionInput { - edge: ActedInUpdateInput - node: MovieUpdateInput - } - - input ActorMoviesUpdateFieldInput { - connect: [ActorMoviesConnectFieldInput!] - create: [ActorMoviesCreateFieldInput!] - delete: [ActorMoviesDeleteFieldInput!] - disconnect: [ActorMoviesDisconnectFieldInput!] - update: ActorMoviesUpdateConnectionInput - where: ActorMoviesConnectionWhere - } - - input ActorOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [ActorSort!] - } - - \\"\\"\\" - Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. - \\"\\"\\" - input ActorSort { - name: SortDirection - } - - input ActorUpdateInput { - movies: [ActorMoviesUpdateFieldInput!] - name: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - moviesAggregate: ActorMoviesAggregateInput - \\"\\"\\" - Return Actors where all of the related ActorMoviesConnections match this filter - \\"\\"\\" - moviesConnection_ALL: ActorMoviesConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorMoviesConnections match this filter - \\"\\"\\" - moviesConnection_NONE: ActorMoviesConnectionWhere - \\"\\"\\" - Return Actors where one of the related ActorMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SINGLE: ActorMoviesConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorMoviesConnections match this filter - \\"\\"\\" - moviesConnection_SOME: ActorMoviesConnectionWhere - \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere - \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere - \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere - \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - name: String @deprecated(reason: \\"Please use the explicit _EQ version\\") - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - type CreateGenresMutationResponse { - genres: [Genre!]! - info: CreateInfo! - } - - \\"\\"\\" - Information about the number of nodes and relationships created during a create mutation - \\"\\"\\" - type CreateInfo { - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"A date, represented as a 'yyyy-mm-dd' string\\"\\"\\" - scalar Date - - \\"\\"\\" - Information about the number of nodes and relationships deleted during a delete mutation - \\"\\"\\" - type DeleteInfo { - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type Genre { - id: ID - } - - type GenreAggregateSelection { - count: Int! - id: IDAggregateSelection! - } - - input GenreCreateInput { - id: ID - } - - type GenreEdge { - cursor: String! - node: Genre! - } - - input GenreOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more GenreSort objects to sort Genres by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [GenreSort!] - } - - \\"\\"\\" - Fields to sort Genres by. The order in which sorts are applied is not guaranteed when specifying many fields in one GenreSort object. - \\"\\"\\" - input GenreSort { - id: SortDirection - } - - input GenreUpdateInput { - id: ID - } - - input GenreWhere { - AND: [GenreWhere!] - NOT: GenreWhere - OR: [GenreWhere!] - id: ID @deprecated(reason: \\"Please use the explicit _EQ version\\") - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - } - - type GenresConnection { - edges: [GenreEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type IDAggregateSelection { - longest: ID - shortest: ID - } - - type IntAggregateSelection { - average: Float - max: Int - min: Int - sum: Int - } - - type Movie implements Production { - actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - title: String! - } - - type MovieActorActorsAggregationSelection { - count: Int! - edge: MovieActorActorsEdgeAggregateSelection - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsEdgeAggregateSelection { - screenTime: IntAggregateSelection! - } - - type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelection! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count: Int @deprecated(reason: \\"Please use the explicit _EQ version\\") - count_EQ: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: ActedInAggregationWhereInput - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - edge: ActedInCreateInput! - where: ActorConnectWhere - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - edge: ActedInSort - node: ActorSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - edge: ActedInWhere - node: ActorWhere - } - - input MovieActorsCreateFieldInput { - edge: ActedInCreateInput! - node: ActorCreateInput! - } - - input MovieActorsDeleteFieldInput { - delete: ActorDeleteInput - where: MovieActorsConnectionWhere - } - - input MovieActorsDisconnectFieldInput { - disconnect: ActorDisconnectInput - where: MovieActorsConnectionWhere - } - - input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - } - - input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int - } - - type MovieActorsRelationship { - cursor: String! - node: Actor! - properties: ActedIn! - } - - input MovieActorsUpdateConnectionInput { - edge: ActedInUpdateInput - node: ActorUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - - input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] - } - - input MovieConnectWhere { - node: MovieWhere! - } - - input MovieCreateInput { - actors: MovieActorsFieldInput - title: String! - } - - input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] - } - - input MovieDisconnectInput { - actors: [MovieActorsDisconnectFieldInput!] - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - input MovieOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [MovieSort!] - } - - \\"\\"\\" - Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. - \\"\\"\\" - input MovieSort { - title: SortDirection - } - - input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - title: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsAggregate: MovieActorsAggregateInput - \\"\\"\\" - Return Movies where all of the related MovieActorsConnections match this filter - \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere - \\"\\"\\" - Return Movies where none of the related MovieActorsConnections match this filter - \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere - \\"\\"\\" - Return Movies where one of the related MovieActorsConnections match this filter - \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere - \\"\\"\\" - Return Movies where some of the related MovieActorsConnections match this filter - \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere - \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere - \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere - \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere - \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - title: String @deprecated(reason: \\"Please use the explicit _EQ version\\") - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteGenres(where: GenreWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateGenres(update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - interface Production { - title: String! - } - - type ProductionAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - - type ProductionEdge { - cursor: String! - node: Production! - } - - enum ProductionImplementation { - Movie - } - - input ProductionOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more ProductionSort objects to sort Productions by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [ProductionSort!] - } - - \\"\\"\\" - Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. - \\"\\"\\" - input ProductionSort { - title: SortDirection - } - - input ProductionWhere { - AND: [ProductionWhere!] - NOT: ProductionWhere - OR: [ProductionWhere!] - title: String @deprecated(reason: \\"Please use the explicit _EQ version\\") - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] - } - - type ProductionsConnection { - edges: [ProductionEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Query { - actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! - genres(limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! - genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! - movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! - productions(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! - productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! - searches(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: SearchWhere): [Search!]! - } - - \\"\\"\\"Input type for options that can be specified on a query operation.\\"\\"\\" - input QueryOptions { - limit: Int - offset: Int - } - - union Search = Genre | Movie - - input SearchWhere { - Genre: GenreWhere - Movie: MovieWhere - } - - \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelection { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - type UpdateGenresMutationResponse { - genres: [Genre!]! - info: UpdateInfo! - } - - \\"\\"\\" - Information about the number of nodes and relationships created and deleted during an update mutation - \\"\\"\\" - type UpdateInfo { - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); - }); -}); diff --git a/packages/graphql/tests/schema/remove-deprecated/implicit-equality.test.ts b/packages/graphql/tests/schema/remove-deprecated/implicit-equality.test.ts index 93b7a4aa44..de1a0b86ed 100644 --- a/packages/graphql/tests/schema/remove-deprecated/implicit-equality.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/implicit-equality.test.ts @@ -109,9 +109,9 @@ describe("Implicit Equality filters", () => { } type Actor { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! name: String } @@ -342,9 +342,9 @@ describe("Implicit Equality filters", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } diff --git a/packages/graphql/tests/schema/remove-deprecated/options-argument.test.ts b/packages/graphql/tests/schema/remove-deprecated/options-argument.test.ts index 6602ad2a2f..33ff10764a 100644 --- a/packages/graphql/tests/schema/remove-deprecated/options-argument.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/options-argument.test.ts @@ -146,9 +146,9 @@ describe("Deprecated options argument", () => { } type Actor { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! name: String! } @@ -446,9 +446,9 @@ describe("Deprecated options argument", () => { } type Movie implements Production { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String! } diff --git a/packages/graphql/tests/schema/remove-deprecated/query-direction.test.ts b/packages/graphql/tests/schema/remove-deprecated/query-direction.test.ts deleted file mode 100644 index 07ade1655f..0000000000 --- a/packages/graphql/tests/schema/remove-deprecated/query-direction.test.ts +++ /dev/null @@ -1,899 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { printSchemaWithDirectives } from "@graphql-tools/utils"; -import { gql } from "graphql-tag"; -import { lexicographicSortSchema } from "graphql/utilities"; -import { Neo4jGraphQL } from "../../../src"; - -describe("Query Direction", () => { - test("DEFAULT_UNDIRECTED", async () => { - const typeDefs = gql` - type User @node { - name: String! - friends: [User!]! - @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: DEFAULT_UNDIRECTED) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\" - Information about the number of nodes and relationships created during a create mutation - \\"\\"\\" - type CreateInfo { - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateUsersMutationResponse { - info: CreateInfo! - users: [User!]! - } - - \\"\\"\\" - Information about the number of nodes and relationships deleted during a delete mutation - \\"\\"\\" - type DeleteInfo { - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type Mutation { - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! - deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! - updateUsers(update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - users(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! - } - - \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelection { - longest: String - shortest: String - } - - \\"\\"\\" - Information about the number of nodes and relationships created and deleted during an update mutation - \\"\\"\\" - type UpdateInfo { - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [User!]! - } - - type User { - friends(directed: Boolean = false @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! - friendsAggregate(directed: Boolean = false @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: UserWhere): UserUserFriendsAggregationSelection - friendsConnection(after: String, directed: Boolean = false @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [UserFriendsConnectionSort!], where: UserFriendsConnectionWhere): UserFriendsConnection! - name: String! - } - - type UserAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - - input UserConnectInput { - friends: [UserFriendsConnectFieldInput!] - } - - input UserConnectWhere { - node: UserWhere! - } - - input UserCreateInput { - friends: UserFriendsFieldInput - name: String! - } - - input UserDeleteInput { - friends: [UserFriendsDeleteFieldInput!] - } - - input UserDisconnectInput { - friends: [UserFriendsDisconnectFieldInput!] - } - - type UserEdge { - cursor: String! - node: User! - } - - input UserFriendsAggregateInput { - AND: [UserFriendsAggregateInput!] - NOT: UserFriendsAggregateInput - OR: [UserFriendsAggregateInput!] - count: Int @deprecated(reason: \\"Please use the explicit _EQ version\\") - count_EQ: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: UserFriendsNodeAggregationWhereInput - } - - input UserFriendsConnectFieldInput { - connect: [UserConnectInput!] - where: UserConnectWhere - } - - type UserFriendsConnection { - edges: [UserFriendsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input UserFriendsConnectionSort { - node: UserSort - } - - input UserFriendsConnectionWhere { - AND: [UserFriendsConnectionWhere!] - NOT: UserFriendsConnectionWhere - OR: [UserFriendsConnectionWhere!] - node: UserWhere - } - - input UserFriendsCreateFieldInput { - node: UserCreateInput! - } - - input UserFriendsDeleteFieldInput { - delete: UserDeleteInput - where: UserFriendsConnectionWhere - } - - input UserFriendsDisconnectFieldInput { - disconnect: UserDisconnectInput - where: UserFriendsConnectionWhere - } - - input UserFriendsFieldInput { - connect: [UserFriendsConnectFieldInput!] - create: [UserFriendsCreateFieldInput!] - } - - input UserFriendsNodeAggregationWhereInput { - AND: [UserFriendsNodeAggregationWhereInput!] - NOT: UserFriendsNodeAggregationWhereInput - OR: [UserFriendsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int - } - - type UserFriendsRelationship { - cursor: String! - node: User! - } - - input UserFriendsUpdateConnectionInput { - node: UserUpdateInput - } - - input UserFriendsUpdateFieldInput { - connect: [UserFriendsConnectFieldInput!] - create: [UserFriendsCreateFieldInput!] - delete: [UserFriendsDeleteFieldInput!] - disconnect: [UserFriendsDisconnectFieldInput!] - update: UserFriendsUpdateConnectionInput - where: UserFriendsConnectionWhere - } - - input UserOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [UserSort!] - } - - \\"\\"\\" - Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. - \\"\\"\\" - input UserSort { - name: SortDirection - } - - input UserUpdateInput { - friends: [UserFriendsUpdateFieldInput!] - name: String - } - - type UserUserFriendsAggregationSelection { - count: Int! - node: UserUserFriendsNodeAggregateSelection - } - - type UserUserFriendsNodeAggregateSelection { - name: StringAggregateSelection! - } - - input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - friendsAggregate: UserFriendsAggregateInput - \\"\\"\\" - Return Users where all of the related UserFriendsConnections match this filter - \\"\\"\\" - friendsConnection_ALL: UserFriendsConnectionWhere - \\"\\"\\" - Return Users where none of the related UserFriendsConnections match this filter - \\"\\"\\" - friendsConnection_NONE: UserFriendsConnectionWhere - \\"\\"\\" - Return Users where one of the related UserFriendsConnections match this filter - \\"\\"\\" - friendsConnection_SINGLE: UserFriendsConnectionWhere - \\"\\"\\" - Return Users where some of the related UserFriendsConnections match this filter - \\"\\"\\" - friendsConnection_SOME: UserFriendsConnectionWhere - \\"\\"\\"Return Users where all of the related Users match this filter\\"\\"\\" - friends_ALL: UserWhere - \\"\\"\\"Return Users where none of the related Users match this filter\\"\\"\\" - friends_NONE: UserWhere - \\"\\"\\"Return Users where one of the related Users match this filter\\"\\"\\" - friends_SINGLE: UserWhere - \\"\\"\\"Return Users where some of the related Users match this filter\\"\\"\\" - friends_SOME: UserWhere - name: String @deprecated(reason: \\"Please use the explicit _EQ version\\") - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String - } - - type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! - }" - `); - }); - - test("DIRECTED_ONLY", async () => { - const typeDefs = gql` - type User @node { - name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: DIRECTED_ONLY) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\" - Information about the number of nodes and relationships created during a create mutation - \\"\\"\\" - type CreateInfo { - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateUsersMutationResponse { - info: CreateInfo! - users: [User!]! - } - - \\"\\"\\" - Information about the number of nodes and relationships deleted during a delete mutation - \\"\\"\\" - type DeleteInfo { - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type Mutation { - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! - deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! - updateUsers(update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - users(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! - } - - \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelection { - longest: String - shortest: String - } - - \\"\\"\\" - Information about the number of nodes and relationships created and deleted during an update mutation - \\"\\"\\" - type UpdateInfo { - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [User!]! - } - - type User { - friends(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! - friendsAggregate(where: UserWhere): UserUserFriendsAggregationSelection - friendsConnection(after: String, first: Int, sort: [UserFriendsConnectionSort!], where: UserFriendsConnectionWhere): UserFriendsConnection! - name: String! - } - - type UserAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - - input UserConnectInput { - friends: [UserFriendsConnectFieldInput!] - } - - input UserConnectWhere { - node: UserWhere! - } - - input UserCreateInput { - friends: UserFriendsFieldInput - name: String! - } - - input UserDeleteInput { - friends: [UserFriendsDeleteFieldInput!] - } - - input UserDisconnectInput { - friends: [UserFriendsDisconnectFieldInput!] - } - - type UserEdge { - cursor: String! - node: User! - } - - input UserFriendsAggregateInput { - AND: [UserFriendsAggregateInput!] - NOT: UserFriendsAggregateInput - OR: [UserFriendsAggregateInput!] - count: Int @deprecated(reason: \\"Please use the explicit _EQ version\\") - count_EQ: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: UserFriendsNodeAggregationWhereInput - } - - input UserFriendsConnectFieldInput { - connect: [UserConnectInput!] - where: UserConnectWhere - } - - type UserFriendsConnection { - edges: [UserFriendsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input UserFriendsConnectionSort { - node: UserSort - } - - input UserFriendsConnectionWhere { - AND: [UserFriendsConnectionWhere!] - NOT: UserFriendsConnectionWhere - OR: [UserFriendsConnectionWhere!] - node: UserWhere - } - - input UserFriendsCreateFieldInput { - node: UserCreateInput! - } - - input UserFriendsDeleteFieldInput { - delete: UserDeleteInput - where: UserFriendsConnectionWhere - } - - input UserFriendsDisconnectFieldInput { - disconnect: UserDisconnectInput - where: UserFriendsConnectionWhere - } - - input UserFriendsFieldInput { - connect: [UserFriendsConnectFieldInput!] - create: [UserFriendsCreateFieldInput!] - } - - input UserFriendsNodeAggregationWhereInput { - AND: [UserFriendsNodeAggregationWhereInput!] - NOT: UserFriendsNodeAggregationWhereInput - OR: [UserFriendsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int - } - - type UserFriendsRelationship { - cursor: String! - node: User! - } - - input UserFriendsUpdateConnectionInput { - node: UserUpdateInput - } - - input UserFriendsUpdateFieldInput { - connect: [UserFriendsConnectFieldInput!] - create: [UserFriendsCreateFieldInput!] - delete: [UserFriendsDeleteFieldInput!] - disconnect: [UserFriendsDisconnectFieldInput!] - update: UserFriendsUpdateConnectionInput - where: UserFriendsConnectionWhere - } - - input UserOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [UserSort!] - } - - \\"\\"\\" - Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. - \\"\\"\\" - input UserSort { - name: SortDirection - } - - input UserUpdateInput { - friends: [UserFriendsUpdateFieldInput!] - name: String - } - - type UserUserFriendsAggregationSelection { - count: Int! - node: UserUserFriendsNodeAggregateSelection - } - - type UserUserFriendsNodeAggregateSelection { - name: StringAggregateSelection! - } - - input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - friendsAggregate: UserFriendsAggregateInput - \\"\\"\\" - Return Users where all of the related UserFriendsConnections match this filter - \\"\\"\\" - friendsConnection_ALL: UserFriendsConnectionWhere - \\"\\"\\" - Return Users where none of the related UserFriendsConnections match this filter - \\"\\"\\" - friendsConnection_NONE: UserFriendsConnectionWhere - \\"\\"\\" - Return Users where one of the related UserFriendsConnections match this filter - \\"\\"\\" - friendsConnection_SINGLE: UserFriendsConnectionWhere - \\"\\"\\" - Return Users where some of the related UserFriendsConnections match this filter - \\"\\"\\" - friendsConnection_SOME: UserFriendsConnectionWhere - \\"\\"\\"Return Users where all of the related Users match this filter\\"\\"\\" - friends_ALL: UserWhere - \\"\\"\\"Return Users where none of the related Users match this filter\\"\\"\\" - friends_NONE: UserWhere - \\"\\"\\"Return Users where one of the related Users match this filter\\"\\"\\" - friends_SINGLE: UserWhere - \\"\\"\\"Return Users where some of the related Users match this filter\\"\\"\\" - friends_SOME: UserWhere - name: String @deprecated(reason: \\"Please use the explicit _EQ version\\") - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String - } - - type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! - }" - `); - }); - - test("UNDIRECTED_ONLY", async () => { - const typeDefs = gql` - type User @node { - name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: UNDIRECTED_ONLY) - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\" - Information about the number of nodes and relationships created during a create mutation - \\"\\"\\" - type CreateInfo { - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateUsersMutationResponse { - info: CreateInfo! - users: [User!]! - } - - \\"\\"\\" - Information about the number of nodes and relationships deleted during a delete mutation - \\"\\"\\" - type DeleteInfo { - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type Mutation { - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! - deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! - updateUsers(update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - users(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! - usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! - } - - \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelection { - longest: String - shortest: String - } - - \\"\\"\\" - Information about the number of nodes and relationships created and deleted during an update mutation - \\"\\"\\" - type UpdateInfo { - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateUsersMutationResponse { - info: UpdateInfo! - users: [User!]! - } - - type User { - friends(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! - friendsAggregate(where: UserWhere): UserUserFriendsAggregationSelection - friendsConnection(after: String, first: Int, sort: [UserFriendsConnectionSort!], where: UserFriendsConnectionWhere): UserFriendsConnection! - name: String! - } - - type UserAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - - input UserConnectInput { - friends: [UserFriendsConnectFieldInput!] - } - - input UserConnectWhere { - node: UserWhere! - } - - input UserCreateInput { - friends: UserFriendsFieldInput - name: String! - } - - input UserDeleteInput { - friends: [UserFriendsDeleteFieldInput!] - } - - input UserDisconnectInput { - friends: [UserFriendsDisconnectFieldInput!] - } - - type UserEdge { - cursor: String! - node: User! - } - - input UserFriendsAggregateInput { - AND: [UserFriendsAggregateInput!] - NOT: UserFriendsAggregateInput - OR: [UserFriendsAggregateInput!] - count: Int @deprecated(reason: \\"Please use the explicit _EQ version\\") - count_EQ: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: UserFriendsNodeAggregationWhereInput - } - - input UserFriendsConnectFieldInput { - connect: [UserConnectInput!] - where: UserConnectWhere - } - - type UserFriendsConnection { - edges: [UserFriendsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input UserFriendsConnectionSort { - node: UserSort - } - - input UserFriendsConnectionWhere { - AND: [UserFriendsConnectionWhere!] - NOT: UserFriendsConnectionWhere - OR: [UserFriendsConnectionWhere!] - node: UserWhere - } - - input UserFriendsCreateFieldInput { - node: UserCreateInput! - } - - input UserFriendsDeleteFieldInput { - delete: UserDeleteInput - where: UserFriendsConnectionWhere - } - - input UserFriendsDisconnectFieldInput { - disconnect: UserDisconnectInput - where: UserFriendsConnectionWhere - } - - input UserFriendsFieldInput { - connect: [UserFriendsConnectFieldInput!] - create: [UserFriendsCreateFieldInput!] - } - - input UserFriendsNodeAggregationWhereInput { - AND: [UserFriendsNodeAggregationWhereInput!] - NOT: UserFriendsNodeAggregationWhereInput - OR: [UserFriendsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int - } - - type UserFriendsRelationship { - cursor: String! - node: User! - } - - input UserFriendsUpdateConnectionInput { - node: UserUpdateInput - } - - input UserFriendsUpdateFieldInput { - connect: [UserFriendsConnectFieldInput!] - create: [UserFriendsCreateFieldInput!] - delete: [UserFriendsDeleteFieldInput!] - disconnect: [UserFriendsDisconnectFieldInput!] - update: UserFriendsUpdateConnectionInput - where: UserFriendsConnectionWhere - } - - input UserOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [UserSort!] - } - - \\"\\"\\" - Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. - \\"\\"\\" - input UserSort { - name: SortDirection - } - - input UserUpdateInput { - friends: [UserFriendsUpdateFieldInput!] - name: String - } - - type UserUserFriendsAggregationSelection { - count: Int! - node: UserUserFriendsNodeAggregateSelection - } - - type UserUserFriendsNodeAggregateSelection { - name: StringAggregateSelection! - } - - input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - friendsAggregate: UserFriendsAggregateInput - \\"\\"\\" - Return Users where all of the related UserFriendsConnections match this filter - \\"\\"\\" - friendsConnection_ALL: UserFriendsConnectionWhere - \\"\\"\\" - Return Users where none of the related UserFriendsConnections match this filter - \\"\\"\\" - friendsConnection_NONE: UserFriendsConnectionWhere - \\"\\"\\" - Return Users where one of the related UserFriendsConnections match this filter - \\"\\"\\" - friendsConnection_SINGLE: UserFriendsConnectionWhere - \\"\\"\\" - Return Users where some of the related UserFriendsConnections match this filter - \\"\\"\\" - friendsConnection_SOME: UserFriendsConnectionWhere - \\"\\"\\"Return Users where all of the related Users match this filter\\"\\"\\" - friends_ALL: UserWhere - \\"\\"\\"Return Users where none of the related Users match this filter\\"\\"\\" - friends_NONE: UserWhere - \\"\\"\\"Return Users where one of the related Users match this filter\\"\\"\\" - friends_SINGLE: UserWhere - \\"\\"\\"Return Users where some of the related Users match this filter\\"\\"\\" - friends_SOME: UserWhere - name: String @deprecated(reason: \\"Please use the explicit _EQ version\\") - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String - } - - type UsersConnection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! - }" - `); - }); -}); diff --git a/packages/graphql/tests/schema/string-comparators.test.ts b/packages/graphql/tests/schema/string-comparators.test.ts index d794db8917..cb89e30136 100644 --- a/packages/graphql/tests/schema/string-comparators.test.ts +++ b/packages/graphql/tests/schema/string-comparators.test.ts @@ -577,9 +577,9 @@ describe("String Comparators", () => { } type Actor { - actedIn(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - actedInAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieActedInAggregationSelection - actedInConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + actedIn(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + actedInAggregate(where: MovieWhere): ActorMovieActedInAggregationSelection + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String } @@ -823,9 +823,9 @@ describe("String Comparators", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } diff --git a/packages/graphql/tests/schema/subscriptions.test.ts b/packages/graphql/tests/schema/subscriptions.test.ts index af8094aa1b..51c2c08f78 100644 --- a/packages/graphql/tests/schema/subscriptions.test.ts +++ b/packages/graphql/tests/schema/subscriptions.test.ts @@ -203,9 +203,9 @@ describe("Subscriptions", () => { type Movie { actorCount: Int - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! averageRating: Float id: ID isActive: Boolean @@ -582,9 +582,9 @@ describe("Subscriptions", () => { } type Actor { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! } type ActorAggregateSelection { @@ -871,9 +871,9 @@ describe("Subscriptions", () => { type Movie { actorCount: Int - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! averageRating: Float id: ID isActive: Boolean @@ -1300,8 +1300,8 @@ describe("Subscriptions", () => { type Movie { actorCount: Int - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! averageRating: Float id: ID isActive: Boolean @@ -1644,9 +1644,9 @@ describe("Subscriptions", () => { } type Person { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): PersonMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [PersonMoviesConnectionSort!], where: PersonMoviesConnectionWhere): PersonMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): PersonMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [PersonMoviesConnectionSort!], where: PersonMoviesConnectionWhere): PersonMoviesConnection! } type PersonAggregateSelection { @@ -1900,9 +1900,9 @@ describe("Subscriptions", () => { } type Star { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): StarMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [StarMoviesConnectionSort!], where: StarMoviesConnectionWhere): StarMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): StarMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [StarMoviesConnectionSort!], where: StarMoviesConnectionWhere): StarMoviesConnection! } type StarAggregateSelection { @@ -2270,9 +2270,9 @@ describe("Subscriptions", () => { } type Actor { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! } type ActorAggregateSelection { @@ -2559,9 +2559,9 @@ describe("Subscriptions", () => { type Movie { actorCount: Int - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! averageRating: Float id: ID isActive: Boolean @@ -3079,9 +3079,9 @@ describe("Subscriptions", () => { type Movie { actorCount: Int - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! averageRating: Float id: ID isActive: Boolean @@ -3399,9 +3399,9 @@ describe("Subscriptions", () => { type Agreement { id: Int! name: String - owner(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): User - ownerAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: UserWhere): AgreementUserOwnerAggregationSelection - ownerConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [AgreementOwnerConnectionSort!], where: AgreementOwnerConnectionWhere): AgreementOwnerConnection! + owner(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): User + ownerAggregate(where: UserWhere): AgreementUserOwnerAggregationSelection + ownerConnection(after: String, first: Int, sort: [AgreementOwnerConnectionSort!], where: AgreementOwnerConnectionWhere): AgreementOwnerConnection! } type AgreementAggregateSelection { @@ -3905,8 +3905,8 @@ describe("Subscriptions", () => { type Movie { actorCount: Int - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: ActorWhere): [Actor!]! - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: ActorWhere): [Actor!]! + actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! averageRating: Float id: ID isActive: Boolean @@ -4249,9 +4249,9 @@ describe("Subscriptions", () => { } type Person { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): PersonMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [PersonMoviesConnectionSort!], where: PersonMoviesConnectionWhere): PersonMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): PersonMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [PersonMoviesConnectionSort!], where: PersonMoviesConnectionWhere): PersonMoviesConnection! } type PersonAggregateSelection { @@ -4505,9 +4505,9 @@ describe("Subscriptions", () => { } type Star { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): StarMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [StarMoviesConnectionSort!], where: StarMoviesConnectionWhere): StarMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): StarMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [StarMoviesConnectionSort!], where: StarMoviesConnectionWhere): StarMoviesConnection! } type StarAggregateSelection { @@ -5003,9 +5003,9 @@ describe("Subscriptions", () => { } type Movie implements Production { - director(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: CreatureOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: CreatureWhere): Creature! - directorAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: CreatureWhere): MovieCreatureDirectorAggregationSelection - directorConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: ProductionDirectorConnectionWhere): ProductionDirectorConnection! + director(limit: Int, offset: Int, options: CreatureOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: CreatureWhere): Creature! + directorAggregate(where: CreatureWhere): MovieCreatureDirectorAggregationSelection + directorConnection(after: String, first: Int, where: ProductionDirectorConnectionWhere): ProductionDirectorConnection! id: ID title: String! } @@ -5161,9 +5161,9 @@ describe("Subscriptions", () => { } type Person implements Creature { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): Production! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ProductionWhere): PersonProductionMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [CreatureMoviesConnectionSort!], where: CreatureMoviesConnectionWhere): CreatureMoviesConnection! + movies(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): Production! + moviesAggregate(where: ProductionWhere): PersonProductionMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [CreatureMoviesConnectionSort!], where: CreatureMoviesConnectionWhere): CreatureMoviesConnection! } type PersonAggregateSelection { @@ -5457,9 +5457,9 @@ describe("Subscriptions", () => { } type Series implements Production { - director(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: CreatureOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: CreatureWhere): Creature! - directorAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: CreatureWhere): SeriesCreatureDirectorAggregationSelection - directorConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: ProductionDirectorConnectionWhere): ProductionDirectorConnection! + director(limit: Int, offset: Int, options: CreatureOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: CreatureWhere): Creature! + directorAggregate(where: CreatureWhere): SeriesCreatureDirectorAggregationSelection + directorConnection(after: String, first: Int, where: ProductionDirectorConnectionWhere): ProductionDirectorConnection! episode: Int! id: ID title: String! diff --git a/packages/graphql/tests/schema/union-interface-relationship.test.ts b/packages/graphql/tests/schema/union-interface-relationship.test.ts index c2d2338da4..06d36790eb 100644 --- a/packages/graphql/tests/schema/union-interface-relationship.test.ts +++ b/packages/graphql/tests/schema/union-interface-relationship.test.ts @@ -144,9 +144,9 @@ describe("Union Interface Relationships", () => { type Actor { id: Int - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! name: String! } @@ -563,15 +563,15 @@ describe("Union Interface Relationships", () => { } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - directors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: DirectorWhere): [Director!]! - directorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieDirectorsConnectionSort!], where: MovieDirectorsConnectionWhere): MovieDirectorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + directors(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: DirectorWhere): [Director!]! + directorsConnection(after: String, first: Int, sort: [MovieDirectorsConnectionSort!], where: MovieDirectorsConnectionWhere): MovieDirectorsConnection! imdbId: Int - reviewers(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ReviewerOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ReviewerSort!], where: ReviewerWhere): [Reviewer!]! - reviewersAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ReviewerWhere): MovieReviewerReviewersAggregationSelection - reviewersConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieReviewersConnectionSort!], where: MovieReviewersConnectionWhere): MovieReviewersConnection! + reviewers(limit: Int, offset: Int, options: ReviewerOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ReviewerSort!], where: ReviewerWhere): [Reviewer!]! + reviewersAggregate(where: ReviewerWhere): MovieReviewerReviewersAggregationSelection + reviewersConnection(after: String, first: Int, sort: [MovieReviewersConnectionSort!], where: MovieReviewersConnectionWhere): MovieReviewersConnection! title: String! } @@ -1187,9 +1187,9 @@ describe("Union Interface Relationships", () => { type Person implements Reviewer { id: Int - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): PersonMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [PersonMoviesConnectionSort!], where: PersonMoviesConnectionWhere): PersonMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): PersonMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [PersonMoviesConnectionSort!], where: PersonMoviesConnectionWhere): PersonMoviesConnection! name: String! reputation: Int! reviewerId: Int diff --git a/packages/graphql/tests/schema/unions.test.ts b/packages/graphql/tests/schema/unions.test.ts index fe40c28d77..425bdfc45f 100644 --- a/packages/graphql/tests/schema/unions.test.ts +++ b/packages/graphql/tests/schema/unions.test.ts @@ -139,8 +139,8 @@ describe("Unions", () => { type Movie { id: ID - search(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: SearchWhere): [Search!]! - searchConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: MovieSearchConnectionWhere): MovieSearchConnection! + search(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: SearchWhere): [Search!]! + searchConnection(after: String, first: Int, where: MovieSearchConnectionWhere): MovieSearchConnection! searchNoDirective: Search } diff --git a/packages/graphql/tests/tck/deprecated/query-direction-aggregations.test.ts b/packages/graphql/tests/tck/deprecated/query-direction-aggregations.test.ts deleted file mode 100644 index accb8b3c69..0000000000 --- a/packages/graphql/tests/tck/deprecated/query-direction-aggregations.test.ts +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Neo4jGraphQL } from "../../../src"; -import { formatCypher, formatParams, translateQuery } from "../utils/tck-test-utils"; - -describe("QueryDirection in relationships aggregations (deprecated _DEFAULT/_ONLY options)", () => { - let typeDefs: string; - let neoSchema: Neo4jGraphQL; - - test("query with directed and undirected relationships with a DEFAULT_UNDIRECTED", async () => { - typeDefs = /* GraphQL */ ` - type User @node { - name: String! - friends: [User!]! - @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: DEFAULT_UNDIRECTED) - } - `; - - neoSchema = new Neo4jGraphQL({ - typeDefs, - }); - const query = /* GraphQL */ ` - query Users { - users { - friendsAggregate { - count - } - } - } - `; - - const result = await translateQuery(neoSchema, query); - - expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) - CALL { - WITH this - MATCH (this)-[this0:FRIENDS_WITH]-(this1:User) - RETURN count(this1) AS var2 - } - RETURN this { friendsAggregate: { count: var2 } } AS this" - `); - expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); - }); - - test("query connection with a DIRECTED_ONLY relationship", async () => { - typeDefs = /* GraphQL */ ` - type User @node { - name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: DIRECTED_ONLY) - } - `; - - neoSchema = new Neo4jGraphQL({ - typeDefs, - }); - const query = /* GraphQL */ ` - query Users { - users { - friendsAggregate { - count - } - } - } - `; - - const result = await translateQuery(neoSchema, query); - - expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) - CALL { - WITH this - MATCH (this)-[this0:FRIENDS_WITH]->(this1:User) - RETURN count(this1) AS var2 - } - RETURN this { friendsAggregate: { count: var2 } } AS this" - `); - expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); - }); - - test("query with a UNDIRECTED_ONLY relationship", async () => { - typeDefs = /* GraphQL */ ` - type User @node { - name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: UNDIRECTED_ONLY) - } - `; - - neoSchema = new Neo4jGraphQL({ - typeDefs, - }); - const query = /* GraphQL */ ` - query Users { - users { - friendsAggregate { - count - } - } - } - `; - - const result = await translateQuery(neoSchema, query); - - expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) - CALL { - WITH this - MATCH (this)-[this0:FRIENDS_WITH]-(this1:User) - RETURN count(this1) AS var2 - } - RETURN this { friendsAggregate: { count: var2 } } AS this" - `); - expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); - }); -}); diff --git a/packages/graphql/tests/tck/deprecated/query-direction-connection.test.ts b/packages/graphql/tests/tck/deprecated/query-direction-connection.test.ts deleted file mode 100644 index 3de3db6fd4..0000000000 --- a/packages/graphql/tests/tck/deprecated/query-direction-connection.test.ts +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Neo4jGraphQL } from "../../../src"; -import { formatCypher, formatParams, translateQuery } from "../utils/tck-test-utils"; - -describe("QueryDirection in relationships connection (deprecated _DEFAULT/_ONLY options)", () => { - let typeDefs: string; - let neoSchema: Neo4jGraphQL; - - test("query with directed and undirected relationships with a DEFAULT_UNDIRECTED", async () => { - typeDefs = /* GraphQL */ ` - type User @node { - name: String! - friends: [User!]! - @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: DEFAULT_UNDIRECTED) - } - `; - - neoSchema = new Neo4jGraphQL({ - typeDefs, - }); - const query = /* GraphQL */ ` - query FriendsAggregate { - users { - friendsConnection { - totalCount - } - } - } - `; - - const result = await translateQuery(neoSchema, query); - - expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) - CALL { - WITH this - MATCH (this)-[this0:FRIENDS_WITH]-(this1:User) - WITH collect({ node: this1, relationship: this0 }) AS edges - WITH edges, size(edges) AS totalCount - CALL { - WITH edges - UNWIND edges AS edge - WITH edge.node AS this1, edge.relationship AS this0 - RETURN collect({ node: { __id: id(this1), __resolveType: \\"User\\" } }) AS var2 - } - RETURN { edges: var2, totalCount: totalCount } AS var3 - } - RETURN this { friendsConnection: var3 } AS this" - `); - - expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); - }); - - test("query connection with a DIRECTED_ONLY relationship", async () => { - typeDefs = /* GraphQL */ ` - type User @node { - name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: DIRECTED_ONLY) - } - `; - - neoSchema = new Neo4jGraphQL({ - typeDefs, - }); - const query = /* GraphQL */ ` - query FriendsAggregate { - users { - friendsConnection { - totalCount - } - } - } - `; - - const result = await translateQuery(neoSchema, query); - - expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) - CALL { - WITH this - MATCH (this)-[this0:FRIENDS_WITH]->(this1:User) - WITH collect({ node: this1, relationship: this0 }) AS edges - WITH edges, size(edges) AS totalCount - CALL { - WITH edges - UNWIND edges AS edge - WITH edge.node AS this1, edge.relationship AS this0 - RETURN collect({ node: { __id: id(this1), __resolveType: \\"User\\" } }) AS var2 - } - RETURN { edges: var2, totalCount: totalCount } AS var3 - } - RETURN this { friendsConnection: var3 } AS this" - `); - - expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); - }); - - test("query with a UNDIRECTED_ONLY relationship", async () => { - typeDefs = /* GraphQL */ ` - type User @node { - name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: UNDIRECTED_ONLY) - } - `; - - neoSchema = new Neo4jGraphQL({ - typeDefs, - }); - const query = /* GraphQL */ ` - query FriendsAggregate { - users { - friendsConnection { - totalCount - } - } - } - `; - - const result = await translateQuery(neoSchema, query); - - expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) - CALL { - WITH this - MATCH (this)-[this0:FRIENDS_WITH]-(this1:User) - WITH collect({ node: this1, relationship: this0 }) AS edges - WITH edges, size(edges) AS totalCount - CALL { - WITH edges - UNWIND edges AS edge - WITH edge.node AS this1, edge.relationship AS this0 - RETURN collect({ node: { __id: id(this1), __resolveType: \\"User\\" } }) AS var2 - } - RETURN { edges: var2, totalCount: totalCount } AS var3 - } - RETURN this { friendsConnection: var3 } AS this" - `); - - expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); - }); - - -}); diff --git a/packages/graphql/tests/tck/deprecated/query-direction.test.ts b/packages/graphql/tests/tck/deprecated/query-direction.test.ts deleted file mode 100644 index ded623331c..0000000000 --- a/packages/graphql/tests/tck/deprecated/query-direction.test.ts +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Neo4jGraphQL } from "../../../src"; -import { formatCypher, formatParams, translateQuery } from "../utils/tck-test-utils"; - -describe("QueryDirection in relationships (deprecated _DEFAULT/_ONLY options)", () => { - let typeDefs: string; - let neoSchema: Neo4jGraphQL; - - test("query with directed and undirected relationships with DEFAULT_UNDIRECTED", async () => { - typeDefs = /* GraphQL */ ` - type User @node { - name: String! - friends: [User!]! - @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: DEFAULT_UNDIRECTED) - } - `; - - neoSchema = new Neo4jGraphQL({ - typeDefs, - }); - const query = /* GraphQL */ ` - query { - users { - name - friends: friends { - name - } - directedFriends: friends(directed: true) { - name - } - } - } - `; - - const result = await translateQuery(neoSchema, query); - - expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) - CALL { - WITH this - MATCH (this)-[this0:FRIENDS_WITH]-(this1:User) - WITH this1 { .name } AS this1 - RETURN collect(this1) AS var2 - } - CALL { - WITH this - MATCH (this)-[this3:FRIENDS_WITH]->(this4:User) - WITH this4 { .name } AS this4 - RETURN collect(this4) AS var5 - } - RETURN this { .name, friends: var2, directedFriends: var5 } AS this" - `); - - expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); - }); - - test("query with directed and undirected relationships with a DEFAULT_DIRECTED", async () => { - typeDefs = /* GraphQL */ ` - type User @node { - name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: DEFAULT_DIRECTED) - } - `; - - neoSchema = new Neo4jGraphQL({ - typeDefs, - }); - const query = /* GraphQL */ ` - query { - users { - name - friends: friends { - name - } - undirectedFriends: friends(directed: false) { - name - } - } - } - `; - - const result = await translateQuery(neoSchema, query); - - expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) - CALL { - WITH this - MATCH (this)-[this0:FRIENDS_WITH]->(this1:User) - WITH this1 { .name } AS this1 - RETURN collect(this1) AS var2 - } - CALL { - WITH this - MATCH (this)-[this3:FRIENDS_WITH]-(this4:User) - WITH this4 { .name } AS this4 - RETURN collect(this4) AS var5 - } - RETURN this { .name, friends: var2, undirectedFriends: var5 } AS this" - `); - - expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); - }); - - test("query with a DIRECTED_ONLY relationship", async () => { - typeDefs = /* GraphQL */ ` - type User @node { - name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: DIRECTED_ONLY) - } - `; - - neoSchema = new Neo4jGraphQL({ - typeDefs, - }); - const query = /* GraphQL */ ` - query { - users { - name - friends: friends { - name - } - } - } - `; - - const result = await translateQuery(neoSchema, query); - - expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) - CALL { - WITH this - MATCH (this)-[this0:FRIENDS_WITH]->(this1:User) - WITH this1 { .name } AS this1 - RETURN collect(this1) AS var2 - } - RETURN this { .name, friends: var2 } AS this" - `); - - expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); - }); - - test("query with a UNDIRECTED_ONLY relationship", async () => { - typeDefs = /* GraphQL */ ` - type User @node { - name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT, queryDirection: UNDIRECTED_ONLY) - } - `; - - neoSchema = new Neo4jGraphQL({ - typeDefs, - }); - const query = /* GraphQL */ ` - query { - users { - name - friends: friends { - name - } - } - } - `; - - const result = await translateQuery(neoSchema, query); - - expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) - CALL { - WITH this - MATCH (this)-[this0:FRIENDS_WITH]-(this1:User) - WITH this1 { .name } AS this1 - RETURN collect(this1) AS var2 - } - RETURN this { .name, friends: var2 } AS this" - `); - - expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); - }); -}); diff --git a/packages/graphql/tests/tck/issues/1348.test.ts b/packages/graphql/tests/tck/issues/1348.test.ts index 4eb85b9017..d7e69f78c9 100644 --- a/packages/graphql/tests/tck/issues/1348.test.ts +++ b/packages/graphql/tests/tck/issues/1348.test.ts @@ -33,16 +33,14 @@ describe("https://github.com/neo4j/graphql/issues/1348", () => { type Series implements Product @node { productTitle: String! - releatsTo: [Product!]! - @relationship(type: "RELATES_TO", direction: OUT, queryDirection: DEFAULT_UNDIRECTED) + releatsTo: [Product!]! @relationship(type: "RELATES_TO", direction: OUT, queryDirection: UNDIRECTED) seasons: [Season!]! } type Season implements Product @node { productTitle: String! - releatsTo: [Product!]! - @relationship(type: "RELATES_TO", direction: OUT, queryDirection: DEFAULT_UNDIRECTED) + releatsTo: [Product!]! @relationship(type: "RELATES_TO", direction: OUT, queryDirection: UNDIRECTED) seasonNumber: Int episodes: [ProgrammeItem!]! @@ -50,8 +48,7 @@ describe("https://github.com/neo4j/graphql/issues/1348", () => { type ProgrammeItem implements Product @node { productTitle: String! - releatsTo: [Product!]! - @relationship(type: "RELATES_TO", direction: OUT, queryDirection: DEFAULT_UNDIRECTED) + releatsTo: [Product!]! @relationship(type: "RELATES_TO", direction: OUT, queryDirection: UNDIRECTED) episodeNumber: Int } diff --git a/packages/graphql/tests/tck/issues/4292.test.ts b/packages/graphql/tests/tck/issues/4292.test.ts index 08079ac838..d8e629ad51 100644 --- a/packages/graphql/tests/tck/issues/4292.test.ts +++ b/packages/graphql/tests/tck/issues/4292.test.ts @@ -87,7 +87,7 @@ describe("https://github.com/neo4j/graphql/issues/4292", () => { partners: [Person!]! @relationship( type: "PARTNER_OF" - queryDirection: UNDIRECTED_ONLY + queryDirection: UNDIRECTED direction: OUT properties: "PartnerOf" ) diff --git a/packages/graphql/tests/tck/undirected-relationships/undirected-aggregations.test.ts b/packages/graphql/tests/tck/undirected-relationships/undirected-aggregations.test.ts deleted file mode 100644 index 26d8e83a70..0000000000 --- a/packages/graphql/tests/tck/undirected-relationships/undirected-aggregations.test.ts +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Neo4jGraphQL } from "../../../src"; -import { formatCypher, formatParams, translateQuery } from "../utils/tck-test-utils"; - -describe("Undirected Aggregations", () => { - let typeDefs: string; - let neoSchema: Neo4jGraphQL; - - test("query with undirected aggregation", async () => { - typeDefs = /* GraphQL */ ` - type User @node { - name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT) - } - `; - - neoSchema = new Neo4jGraphQL({ - typeDefs, - }); - const query = /* GraphQL */ ` - query Users { - users { - friendsAggregate(directed: false) { - count - } - } - } - `; - - const result = await translateQuery(neoSchema, query); - - expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) - CALL { - WITH this - MATCH (this)-[this0:FRIENDS_WITH]-(this1:User) - RETURN count(this1) AS var2 - } - RETURN this { friendsAggregate: { count: var2 } } AS this" - `); - - expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); - }); -}); diff --git a/packages/graphql/tests/tck/undirected-relationships/undirected-connection.test.ts b/packages/graphql/tests/tck/undirected-relationships/undirected-connection.test.ts deleted file mode 100644 index cc4f2a868d..0000000000 --- a/packages/graphql/tests/tck/undirected-relationships/undirected-connection.test.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Neo4jGraphQL } from "../../../src"; -import { formatCypher, formatParams, translateQuery } from "../utils/tck-test-utils"; - -describe("Undirected connections", () => { - let typeDefs: string; - let neoSchema: Neo4jGraphQL; - - test("query with undirected aggregation", async () => { - typeDefs = /* GraphQL */ ` - type User @node { - name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT) - } - `; - - neoSchema = new Neo4jGraphQL({ - typeDefs, - }); - const query = /* GraphQL */ ` - query FriendsAggregate { - users { - friendsConnection(directed: false) { - totalCount - } - } - } - `; - - const result = await translateQuery(neoSchema, query); - - expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) - CALL { - WITH this - MATCH (this)-[this0:FRIENDS_WITH]-(this1:User) - WITH collect({ node: this1, relationship: this0 }) AS edges - WITH edges, size(edges) AS totalCount - CALL { - WITH edges - UNWIND edges AS edge - WITH edge.node AS this1, edge.relationship AS this0 - RETURN collect({ node: { __id: id(this1), __resolveType: \\"User\\" } }) AS var2 - } - RETURN { edges: var2, totalCount: totalCount } AS var3 - } - RETURN this { friendsConnection: var3 } AS this" - `); - - expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); - }); -}); diff --git a/packages/graphql/tests/tck/undirected-relationships/undirected-relationships.test.ts b/packages/graphql/tests/tck/undirected-relationships/undirected-relationships.test.ts deleted file mode 100644 index 30b2983539..0000000000 --- a/packages/graphql/tests/tck/undirected-relationships/undirected-relationships.test.ts +++ /dev/null @@ -1,258 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Neo4jGraphQL } from "../../../src"; -import { formatCypher, formatParams, translateQuery } from "../utils/tck-test-utils"; - -describe("Undirected relationships", () => { - let typeDefs: string; - let neoSchema: Neo4jGraphQL; - - test("query with directed and undirected relationships", async () => { - typeDefs = /* GraphQL */ ` - type User @node { - name: String! - friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT) - } - `; - - neoSchema = new Neo4jGraphQL({ - typeDefs, - }); - const query = /* GraphQL */ ` - query { - users { - name - friends: friends(directed: false) { - name - } - directedFriends: friends { - name - } - } - } - `; - - const result = await translateQuery(neoSchema, query); - - expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) - CALL { - WITH this - MATCH (this)-[this0:FRIENDS_WITH]-(this1:User) - WITH this1 { .name } AS this1 - RETURN collect(this1) AS var2 - } - CALL { - WITH this - MATCH (this)-[this3:FRIENDS_WITH]->(this4:User) - WITH this4 { .name } AS this4 - RETURN collect(this4) AS var5 - } - RETURN this { .name, friends: var2, directedFriends: var5 } AS this" - `); - - expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); - }); - - test("undirected with unions", async () => { - typeDefs = /* GraphQL */ ` - union Content = Blog | Post - - type Blog @node { - title: String - posts: [Post!]! @relationship(type: "HAS_POST", direction: OUT) - } - - type Post @node { - content: String - } - - type User @node { - name: String - content: [Content!]! @relationship(type: "HAS_CONTENT", direction: OUT) - } - `; - - neoSchema = new Neo4jGraphQL({ - typeDefs, - }); - const query = /* GraphQL */ ` - query Users { - users { - content(directed: false) { - ... on Blog { - title - } - ... on Post { - content - } - } - } - } - `; - - const result = await translateQuery(neoSchema, query); - - expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:User) - CALL { - WITH this - CALL { - WITH * - MATCH (this)-[this0:HAS_CONTENT]-(this1:Blog) - WITH this1 { .title, __resolveType: \\"Blog\\", __id: id(this1) } AS this1 - RETURN this1 AS var2 - UNION - WITH * - MATCH (this)-[this3:HAS_CONTENT]-(this4:Post) - WITH this4 { .content, __resolveType: \\"Post\\", __id: id(this4) } AS this4 - RETURN this4 AS var2 - } - WITH var2 - RETURN collect(var2) AS var2 - } - RETURN this { content: var2 } AS this" - `); - - expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); - }); - - test("undirected with interfaces", async () => { - typeDefs = /* GraphQL */ ` - interface Production { - title: String! - actors: [Actor!]! - } - - type Movie implements Production @node { - title: String! - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") - runtime: Int! - } - - type Series implements Production @node { - title: String! - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") - episodes: Int! - } - - type ActedIn @relationshipProperties { - role: String! - } - - type Actor @node { - name: String! - actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") - } - `; - - neoSchema = new Neo4jGraphQL({ - typeDefs, - }); - const query = /* GraphQL */ ` - query Actors { - actors { - actedIn(directed: false) { - title - } - } - } - `; - - const result = await translateQuery(neoSchema, query); - - expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Actor) - CALL { - WITH this - CALL { - WITH * - MATCH (this)-[this0:ACTED_IN]-(this1:Movie) - WITH this1 { .title, __resolveType: \\"Movie\\", __id: id(this1) } AS this1 - RETURN this1 AS var2 - UNION - WITH * - MATCH (this)-[this3:ACTED_IN]-(this4:Series) - WITH this4 { .title, __resolveType: \\"Series\\", __id: id(this4) } AS this4 - RETURN this4 AS var2 - } - WITH var2 - RETURN collect(var2) AS var2 - } - RETURN this { actedIn: var2 } AS this" - `); - - expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); - }); - - test("nested undirected relationship", async () => { - typeDefs = /* GraphQL */ ` - type Foo @node { - id: ID - Name: String - Age: Int - DrinksAt: Bar @relationship(type: "DRINKS_AT", direction: OUT) - } - - type Bar @node { - id: ID - Adress: String - Customers: [Foo!]! @relationship(type: "DRINKS_AT", direction: IN) - } - `; - - neoSchema = new Neo4jGraphQL({ - typeDefs, - }); - const query = /* GraphQL */ ` - query Query { - foos { - DrinksAt { - id - Customers(directed: false) { - Name - } - } - } - } - `; - - const result = await translateQuery(neoSchema, query); - - expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Foo) - CALL { - WITH this - MATCH (this)-[this0:DRINKS_AT]->(this1:Bar) - CALL { - WITH this1 - MATCH (this1)-[this2:DRINKS_AT]-(this3:Foo) - WITH this3 { .Name } AS this3 - RETURN collect(this3) AS var4 - } - WITH this1 { .id, Customers: var4 } AS this1 - RETURN head(collect(this1)) AS var5 - } - RETURN this { DrinksAt: var5 } AS this" - `); - - expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); - }); -}); From 9ae722b60541bb0fb1c12b0032453a65681ffd60 Mon Sep 17 00:00:00 2001 From: Darrell Warde <8117355+darrellwarde@users.noreply.github.com> Date: Mon, 11 Nov 2024 15:37:00 +0000 Subject: [PATCH 2/6] Create healthy-swans-shave.md --- .changeset/healthy-swans-shave.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/healthy-swans-shave.md diff --git a/.changeset/healthy-swans-shave.md b/.changeset/healthy-swans-shave.md new file mode 100644 index 0000000000..419a256e0c --- /dev/null +++ b/.changeset/healthy-swans-shave.md @@ -0,0 +1,5 @@ +--- +"@neo4j/graphql": major +--- + +The deprecated `directed` argument has been removed, and `queryDirection` now only accepts two possible values - `DIRECTED` (default) and `UNDIRECTED`. From 6b7e426c876bf34ddc9947f6de77d8502a3cd4d4 Mon Sep 17 00:00:00 2001 From: Darrell Warde Date: Tue, 12 Nov 2024 15:30:45 +0000 Subject: [PATCH 3/6] Remove unused code --- .../model-adapters/RelationshipAdapter.ts | 4 +- .../ast/operations/AggregationOperation.ts | 2 +- .../composite/CompositeAggregationPartial.ts | 2 +- .../ast/selection/RelationshipSelection.ts | 2 +- .../src/utils/get-relationship-direction.ts | 52 ------------------- 5 files changed, 5 insertions(+), 57 deletions(-) delete mode 100644 packages/graphql/src/utils/get-relationship-direction.ts diff --git a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts index ed5d07cd21..1a7f421488 100644 --- a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts +++ b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts @@ -156,8 +156,8 @@ export class RelationshipAdapter { * @param directed the direction asked during the query, for instance "friends(directed: true)" * @returns the direction to use in the CypherBuilder **/ - public getCypherDirection(directed?: boolean): "left" | "right" | "undirected" { - if (directed === false || this.queryDirection === "UNDIRECTED") { + public getCypherDirection(): "left" | "right" | "undirected" { + if (this.queryDirection === "UNDIRECTED") { return "undirected"; } return this.cypherDirectionFromRelDirection(); diff --git a/packages/graphql/src/translate/queryAST/ast/operations/AggregationOperation.ts b/packages/graphql/src/translate/queryAST/ast/operations/AggregationOperation.ts index 0689e763b7..6bffecd7b3 100644 --- a/packages/graphql/src/translate/queryAST/ast/operations/AggregationOperation.ts +++ b/packages/graphql/src/translate/queryAST/ast/operations/AggregationOperation.ts @@ -152,7 +152,7 @@ export class AggregationOperation extends Operation { if (this.entity instanceof RelationshipAdapter) { const relVar = new Cypher.Relationship(); const targetNode = new Cypher.Node(); - const relDirection = this.entity.getCypherDirection(this.directed); + const relDirection = this.entity.getCypherDirection(); return parentContext.push({ relationship: relVar, target: targetNode, direction: relDirection }); } else { const targetNode = new Cypher.Node(); diff --git a/packages/graphql/src/translate/queryAST/ast/operations/composite/CompositeAggregationPartial.ts b/packages/graphql/src/translate/queryAST/ast/operations/composite/CompositeAggregationPartial.ts index c11663534d..ed9767502b 100644 --- a/packages/graphql/src/translate/queryAST/ast/operations/composite/CompositeAggregationPartial.ts +++ b/packages/graphql/src/translate/queryAST/ast/operations/composite/CompositeAggregationPartial.ts @@ -78,7 +78,7 @@ export class CompositeAggregationPartial extends QueryASTNode { if (this.entity instanceof RelationshipAdapter) { const relVar = new Cypher.Relationship(); - const relDirection = this.entity.getCypherDirection(this.directed); + const relDirection = this.entity.getCypherDirection(); if (this.attachedTo === "relationship") { target = relVar; } diff --git a/packages/graphql/src/translate/queryAST/ast/selection/RelationshipSelection.ts b/packages/graphql/src/translate/queryAST/ast/selection/RelationshipSelection.ts index 9c9974a613..4276891e76 100644 --- a/packages/graphql/src/translate/queryAST/ast/selection/RelationshipSelection.ts +++ b/packages/graphql/src/translate/queryAST/ast/selection/RelationshipSelection.ts @@ -64,7 +64,7 @@ export class RelationshipSelection extends EntitySelection { const relationshipTarget = this.targetOverride ?? this.relationship.target; const targetNode = createNode(this.alias); const labels = getEntityLabels(relationshipTarget, context.neo4jGraphQLContext); - const relDirection = this.relationship.getCypherDirection(this.directed); + const relDirection = this.relationship.getCypherDirection(); const pattern = new Cypher.Pattern(context.target) .related(relVar, { direction: relDirection, type: this.relationship.type }) diff --git a/packages/graphql/src/utils/get-relationship-direction.ts b/packages/graphql/src/utils/get-relationship-direction.ts deleted file mode 100644 index 63a8403f9c..0000000000 --- a/packages/graphql/src/utils/get-relationship-direction.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { RelationshipQueryDirectionOption } from "../constants"; -import type { RelationField } from "../types"; - -type QueryRelationshipDirection = "IN" | "OUT" | "undirected"; -type CypherRelationshipDirection = "left" | "right" | "undirected"; - -export function getCypherRelationshipDirection( - relationField: RelationField, - fieldArgs: { directed?: boolean } = {} -): CypherRelationshipDirection { - const direction = getRelationshipDirection(relationField, fieldArgs); - switch (direction) { - case "IN": - return "left"; - case "OUT": - return "right"; - case "undirected": - return "undirected"; - } -} - -function getRelationshipDirection( - relationField: RelationField, - fieldArgs: { directed?: boolean } -): QueryRelationshipDirection { - /** - * Duplicate of the schema-model `getCypherDirection` method; - **/ - if (fieldArgs.directed === false || relationField.queryDirection === RelationshipQueryDirectionOption.UNDIRECTED) { - return "undirected"; - } - return relationField.direction; -} From 4b5968b6189fe93cf9cd7613bbf67c20d855ef8f Mon Sep 17 00:00:00 2001 From: Darrell Warde <8117355+darrellwarde@users.noreply.github.com> Date: Wed, 13 Nov 2024 15:54:49 +0000 Subject: [PATCH 4/6] Update healthy-swans-shave.md --- .changeset/healthy-swans-shave.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.changeset/healthy-swans-shave.md b/.changeset/healthy-swans-shave.md index 419a256e0c..1fc4dac9b1 100644 --- a/.changeset/healthy-swans-shave.md +++ b/.changeset/healthy-swans-shave.md @@ -3,3 +3,5 @@ --- The deprecated `directed` argument has been removed, and `queryDirection` now only accepts two possible values - `DIRECTED` (default) and `UNDIRECTED`. + +Additionally, the `directedArgument` setting of `excludeDeprecatedFields` has been removed as these deprecated fields have been removed. From e6c23db4a8658a31b83228722e027bfd90afd06c Mon Sep 17 00:00:00 2001 From: Darrell Warde Date: Wed, 13 Nov 2024 15:59:06 +0000 Subject: [PATCH 5/6] Merge remote-tracking branch 'upstream/7.x' into breaking/remove-directed --- .changeset/fresh-pumpkins-doubt.md | 26 + .changeset/mean-horses-worry.md | 5 + .../workflows/reusable-codeql-analysis.yml | 4 +- .prettierrc | 3 +- jest.config.base.js | 2 + package.json | 5 +- packages/graphql/package.json | 6 +- packages/graphql/src/classes/Node.ts | 12 +- packages/graphql/src/classes/Relationship.ts | 22 +- packages/graphql/src/schema/constants.ts | 7 + .../src/schema/create-connection-fields.ts | 1 + .../create-relationship-fields.ts | 7 +- .../generation/augment-object-or-interface.ts | 4 +- .../generation/connection-where-input.ts | 7 - .../src/schema/generation/delete-input.ts | 19 +- .../src/schema/generation/disconnect-input.ts | 7 +- .../src/schema/generation/update-input.ts | 23 +- .../src/schema/make-augmented-schema.ts | 7 +- .../schema/resolvers/mutation/delete.test.ts | 7 +- .../src/schema/resolvers/mutation/delete.ts | 4 - .../schema/resolvers/mutation/update.test.ts | 15 +- .../src/schema/resolvers/mutation/update.ts | 6 - packages/graphql/src/schema/to-compose.ts | 28 +- .../translate/create-connect-and-params.ts | 25 +- .../src/translate/create-create-and-params.ts | 25 +- ...-set-relationship-properties-and-params.ts | 99 -- .../create-set-relationship-properties.ts | 147 +- .../src/translate/create-update-and-params.ts | 126 +- .../ast/filters/RelationshipFilter.ts | 4 +- .../parsers/is-unwind-create-supported.ts | 8 - .../parsers/parse-mutation-field.test.ts | 2 +- .../factory/parsers/parse-mutation-field.ts | 15 +- .../graphql/src/translate/translate-create.ts | 7 +- .../graphql/src/translate/translate-delete.ts | 3 - .../graphql/src/translate/translate-update.ts | 13 +- .../utils/assert-non-ambiguous-update.ts | 33 + .../utils/get-mutation-field-statements.ts | 102 ++ packages/graphql/src/translate/utils/math.ts | 6 +- .../translate/utils/parse-mutable-field.ts | 37 + packages/graphql/src/types/index.ts | 1 + .../src/utils/find-conflicting-properties.ts | 8 +- .../update/top-level-where.int.test.ts | 4 +- .../mutations/update/update-arg.int.test.ts | 8 +- .../array-pop-errors.int.test.ts | 21 +- .../array-methods/array-pop.int.test.ts | 2 +- .../array-push-errors.int.test.ts | 35 +- .../integration/composite-where.int.test.ts | 2 +- .../update-no-implicit-set.int.test.ts | 1392 +++++++++++++++++ ...e-relationship-no-implicit-set.int.test.ts | 310 ++++ .../integration/directives/alias.int.test.ts | 6 +- .../directives/alias/nodes.int.test.ts | 172 +- .../authorization/allow.int.test.ts | 24 +- .../directives/authorization/bind.int.test.ts | 26 +- .../is-authenticated.int.test.ts | 212 +-- .../authorization/roles.int.test.ts | 24 +- .../authorization/where.int.test.ts | 6 +- .../directives/populatedBy.int.test.ts | 62 +- .../populatedBy-node-properties.int.test.ts | 418 ++--- ...atedBy-relationship-properties.int.test.ts | 76 +- .../relationship/nestedOperations.int.test.ts | 6 +- .../directives/timestamp/datetime.int.test.ts | 24 +- .../directives/timestamp/time.int.test.ts | 26 +- .../interface-simple.int.test.ts | 10 +- .../type-narrowing-mutations.int.test.ts | 2 +- .../relationships/update/connect.int.test.ts | 2 +- .../relationships/update/update.int.test.ts | 8 +- .../tests/integration/issues/1414.int.test.ts | 4 +- .../tests/integration/issues/1551.int.test.ts | 2 +- .../tests/integration/issues/2250.int.test.ts | 10 +- .../tests/integration/issues/2782.int.test.ts | 6 +- .../tests/integration/issues/2803.int.test.ts | 4 +- .../tests/integration/issues/288.int.test.ts | 6 +- .../tests/integration/issues/3251.int.test.ts | 2 +- .../tests/integration/issues/3355.int.test.ts | 4 +- .../tests/integration/issues/3428.int.test.ts | 4 +- .../tests/integration/issues/579.int.test.ts | 2 +- .../tests/integration/issues/894.int.test.ts | 30 +- .../integration/issues/only-info.int.test.ts | 4 +- .../tests/integration/math.int.test.ts | 56 +- .../update.int.test.ts | 6 +- .../integration/rfcs/rfc-003.int.test.ts | 10 +- .../subscriptions/auth/allow.int.test.ts | 20 +- .../update/top-level-where.int.test.ts | 2 +- .../tests/integration/types/date.int.test.ts | 4 +- .../integration/types/datetime.int.test.ts | 4 +- .../integration/types/duration.int.test.ts | 2 +- .../types/localdatetime.int.test.ts | 2 +- .../integration/types/localtime.int.test.ts | 2 +- .../types/point-cartesian.int.test.ts | 4 +- .../tests/integration/types/point.int.test.ts | 6 +- .../types/points-cartesian.int.test.ts | 4 +- .../integration/types/points.int.test.ts | 8 +- .../tests/integration/types/time.int.test.ts | 4 +- .../union-relationship-filtering.int.test.ts | 2 +- .../integration/unions/unions.int.test.ts | 10 +- .../tests/integration/update.int.test.ts | 97 +- .../graphql/tests/schema/aggregations.test.ts | 96 +- .../tests/schema/array-methods.test.ts | 15 +- packages/graphql/tests/schema/arrays.test.ts | 9 +- .../tests/schema/authorization.test.ts | 12 +- .../graphql/tests/schema/comments.test.ts | 51 +- .../tests/schema/connections/enums.test.ts | 9 +- .../schema/connections/interfaces.test.ts | 24 +- .../tests/schema/connections/sort.test.ts | 3 +- .../tests/schema/connections/unions.test.ts | 12 +- .../tests/schema/custom-mutations.test.ts | 3 +- .../tests/schema/directive-preserve.test.ts | 85 +- .../tests/schema/directives/alias.test.ts | 18 +- .../schema/directives/autogenerate.test.ts | 3 +- .../schema/directives/customResolver.test.ts | 9 +- .../tests/schema/directives/cypher.test.ts | 27 +- .../tests/schema/directives/default.test.ts | 27 +- .../schema/directives/filterable.test.ts | 144 +- .../tests/schema/directives/plural.test.ts | 30 +- .../schema/directives/populatedBy.test.ts | 36 +- .../tests/schema/directives/private.test.ts | 9 +- .../directives/relationship-aggregate.test.ts | 72 +- .../relationship-nested-operations.test.ts | 252 ++- .../relationship-properties.test.ts | 30 +- .../schema/directives/relationship.test.ts | 12 +- .../schema/directives/selectable.test.ts | 114 +- .../tests/schema/directives/settable.test.ts | 180 ++- .../schema/directives/timestamps.test.ts | 6 +- packages/graphql/tests/schema/enum.test.ts | 3 +- packages/graphql/tests/schema/extend.test.ts | 6 +- .../graphql/tests/schema/federation.test.ts | 12 +- .../graphql/tests/schema/fulltext.test.ts | 6 +- .../graphql/tests/schema/global-node.test.ts | 6 +- .../graphql/tests/schema/inheritance.test.ts | 9 +- packages/graphql/tests/schema/inputs.test.ts | 3 +- .../schema/interface-relationships.test.ts | 192 ++- .../graphql/tests/schema/interfaces.test.ts | 6 +- .../graphql/tests/schema/issues/1038.test.ts | 12 +- .../graphql/tests/schema/issues/1182.test.ts | 12 +- .../graphql/tests/schema/issues/1614.test.ts | 6 +- .../graphql/tests/schema/issues/162.test.ts | 9 +- .../graphql/tests/schema/issues/200.test.ts | 9 +- .../graphql/tests/schema/issues/2187.test.ts | 10 +- .../graphql/tests/schema/issues/2377.test.ts | 21 +- .../graphql/tests/schema/issues/2969.test.ts | 9 +- .../graphql/tests/schema/issues/2981.test.ts | 12 +- .../graphql/tests/schema/issues/2993.test.ts | 12 +- .../graphql/tests/schema/issues/3428.test.ts | 15 +- .../graphql/tests/schema/issues/3439.test.ts | 99 +- .../graphql/tests/schema/issues/3537.test.ts | 18 +- .../graphql/tests/schema/issues/3541.test.ts | 9 +- .../graphql/tests/schema/issues/3698.test.ts | 63 +- .../graphql/tests/schema/issues/3816.test.ts | 12 +- .../graphql/tests/schema/issues/3817.test.ts | 3 +- .../graphql/tests/schema/issues/4511.test.ts | 18 +- .../graphql/tests/schema/issues/4615.test.ts | 24 +- .../graphql/tests/schema/issues/5428.test.ts | 3 +- .../graphql/tests/schema/issues/609.test.ts | 1 + .../graphql/tests/schema/issues/872.test.ts | 9 +- .../tests/schema/lowercase-type-names.test.ts | 21 +- packages/graphql/tests/schema/math.test.ts | 51 +- .../schema/nested-aggregation-on-type.test.ts | 15 +- packages/graphql/tests/schema/null.test.ts | 39 +- .../schema/pluralize-consistency.test.ts | 6 +- .../tests/schema/query-direction.test.ts | 6 +- .../remove-deprecated/array-methods.test.ts | 15 +- .../schema/remove-deprecated/comments.test.ts | 51 +- .../implicit-equality.test.ts | 9 +- .../remove-deprecated/implicit-set.test.ts | 629 ++++++++ .../options-argument.test.ts | 18 +- packages/graphql/tests/schema/scalar.test.ts | 12 +- packages/graphql/tests/schema/simple.test.ts | 12 +- .../tests/schema/string-comparators.test.ts | 18 +- .../tests/schema/subscriptions.test.ts | 111 +- .../graphql/tests/schema/types/bigint.test.ts | 6 +- .../graphql/tests/schema/types/date.test.ts | 6 +- .../tests/schema/types/datetime.test.ts | 6 +- .../tests/schema/types/duration.test.ts | 6 +- .../tests/schema/types/localdatetime.test.ts | 6 +- .../tests/schema/types/localtime.test.ts | 6 +- .../graphql/tests/schema/types/point.test.ts | 12 +- .../graphql/tests/schema/types/time.test.ts | 6 +- .../union-interface-relationship.test.ts | 48 +- packages/graphql/tests/schema/unions.test.ts | 6 +- packages/graphql/tests/schema/vector.test.ts | 6 +- .../graphql/tests/tck/array-methods.test.ts | 16 +- .../relationship_properties/update.test.ts | 12 +- .../tests/tck/deprecated/update.test.ts | 995 ++++++++++++ .../arguments/allow/allow.test.ts | 27 +- .../implementation-allow.test.ts | 11 +- .../implementation-is-authenticated.test.ts | 12 +- .../is-authenticated/is-authenticated.test.ts | 12 +- .../arguments/roles-where.test.ts | 18 +- .../arguments/roles/roles.test.ts | 12 +- .../implementation-bind.test.ts | 10 +- .../arguments/validate/validate.test.ts | 14 +- .../implementation-where.test.ts | 20 +- .../arguments/where/where.test.ts | 18 +- .../authorization/projection.test.ts | 6 +- .../tests/tck/directives/autogenerate.test.ts | 6 +- .../update/connect.test.ts | 6 +- .../update/update.test.ts | 23 +- .../node/node-additional-labels.test.ts | 6 +- .../tck/directives/node/node-label.test.ts | 16 +- .../tests/tck/directives/plural.test.ts | 6 +- .../graphql/tests/tck/issues/2782.test.ts | 16 +- .../graphql/tests/tck/issues/2789.test.ts | 6 +- .../graphql/tests/tck/issues/2803.test.ts | 6 +- packages/graphql/tests/tck/issues/288.test.ts | 6 +- packages/graphql/tests/tck/issues/324.test.ts | 6 +- .../graphql/tests/tck/issues/3251.test.ts | 9 +- .../graphql/tests/tck/issues/4583.test.ts | 8 +- .../tests/tck/operations/disconnect.test.ts | 16 +- .../tests/tck/operations/update.test.ts | 40 +- packages/graphql/tests/tck/pringles.test.ts | 8 +- .../graphql/tests/tck/rfcs/rfc-003.test.ts | 24 +- .../tests/tck/subscriptions/update.test.ts | 22 +- packages/graphql/tests/tck/types/date.test.ts | 6 +- .../graphql/tests/tck/types/datetime.test.ts | 6 +- .../graphql/tests/tck/types/duration.test.ts | 6 +- .../tests/tck/types/localdatetime.test.ts | 6 +- .../graphql/tests/tck/types/localtime.test.ts | 6 +- .../graphql/tests/tck/types/point.test.ts | 9 +- .../graphql/tests/tck/types/points.test.ts | 10 +- packages/graphql/tests/tck/types/time.test.ts | 6 +- packages/graphql/tests/tck/union.test.ts | 8 +- packages/introspector/package.json | 2 +- yarn.lock | 544 +++---- 223 files changed, 6606 insertions(+), 2547 deletions(-) create mode 100644 .changeset/fresh-pumpkins-doubt.md create mode 100644 .changeset/mean-horses-worry.md delete mode 100644 packages/graphql/src/translate/create-set-relationship-properties-and-params.ts create mode 100644 packages/graphql/src/translate/utils/assert-non-ambiguous-update.ts create mode 100644 packages/graphql/src/translate/utils/get-mutation-field-statements.ts create mode 100644 packages/graphql/src/translate/utils/parse-mutable-field.ts create mode 100644 packages/graphql/tests/integration/deprecations/update-no-implicit-set.int.test.ts create mode 100644 packages/graphql/tests/integration/deprecations/update-relationship-no-implicit-set.int.test.ts create mode 100644 packages/graphql/tests/schema/remove-deprecated/implicit-set.test.ts create mode 100644 packages/graphql/tests/tck/deprecated/update.test.ts diff --git a/.changeset/fresh-pumpkins-doubt.md b/.changeset/fresh-pumpkins-doubt.md new file mode 100644 index 0000000000..827943eb3a --- /dev/null +++ b/.changeset/fresh-pumpkins-doubt.md @@ -0,0 +1,26 @@ +--- +"@neo4j/graphql": patch +--- + +Deprecate implicit `SET`: + +```graphql +mutation { + updateMovies( update: { id: "2" }) { + movies { + id + } + } +} +``` +in favour of the explicit `_SET` version: + +```graphql +mutation { + updateMovies(update: { id_SET: "2" }) { + movies { + id + } + } +} +``` diff --git a/.changeset/mean-horses-worry.md b/.changeset/mean-horses-worry.md new file mode 100644 index 0000000000..0e9059917b --- /dev/null +++ b/.changeset/mean-horses-worry.md @@ -0,0 +1,5 @@ +--- +"@neo4j/graphql": patch +--- + +Added `implicitSet` to the `excludeDeprecatedFields` setting, to disable generation of the deprecated mutation field without the suffix `_SET`. diff --git a/.github/workflows/reusable-codeql-analysis.yml b/.github/workflows/reusable-codeql-analysis.yml index 6195c78337..44f9bb0e22 100644 --- a/.github/workflows/reusable-codeql-analysis.yml +++ b/.github/workflows/reusable-codeql-analysis.yml @@ -14,9 +14,9 @@ jobs: with: node-version: lts/* - name: Initialize CodeQL - uses: github/codeql-action/init@662472033e021d55d94146f66f6058822b0b39fd # v3 + uses: github/codeql-action/init@4f3212b61783c3c68e8309a0f18a699764811cda # v3 with: config-file: ./.github/codeql/codeql-config.yml languages: javascript - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@662472033e021d55d94146f66f6058822b0b39fd # v3 + uses: github/codeql-action/analyze@4f3212b61783c3c68e8309a0f18a699764811cda # v3 diff --git a/.prettierrc b/.prettierrc index 94e547db9d..f2b530c471 100644 --- a/.prettierrc +++ b/.prettierrc @@ -9,5 +9,6 @@ "tabWidth": 2 } } - ] + ], + "trailingComma": "es5" } diff --git a/jest.config.base.js b/jest.config.base.js index 907f4569a1..85713ee022 100644 --- a/jest.config.base.js +++ b/jest.config.base.js @@ -23,4 +23,6 @@ module.exports = { escapeString: true, printBasicPrototype: true, }, + + prettierPath: require.resolve("prettier-2"), }; diff --git a/package.json b/package.json index e2ebbbf888..7992f7060f 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "@tsconfig/node16": "1.0.4", "@typescript-eslint/eslint-plugin": "7.18.0", "@typescript-eslint/parser": "7.18.0", - "concurrently": "9.0.1", + "concurrently": "9.1.0", "dotenv": "16.4.5", "eslint": "8.57.1", "eslint-config-prettier": "9.1.0", @@ -41,7 +41,8 @@ "jest": "29.7.0", "lint-staged": "15.2.10", "neo4j-driver": "5.26.0", - "prettier": "2.8.8", + "prettier": "3.3.3", + "prettier-2": "npm:prettier@2.8.8", "set-tz": "0.2.0", "ts-jest": "29.2.5", "typescript": "5.1.6" diff --git a/packages/graphql/package.json b/packages/graphql/package.json index 23f28ba4f7..6ae436b6c6 100644 --- a/packages/graphql/package.json +++ b/packages/graphql/package.json @@ -47,12 +47,12 @@ "@types/is-uuid": "1.0.2", "@types/jest": "29.5.14", "@types/jsonwebtoken": "9.0.7", - "@types/node": "20.17.5", + "@types/node": "22.9.0", "@types/pluralize": "0.0.33", "@types/randomstring": "1.3.0", "@types/semver": "7.5.8", "@types/supertest": "6.0.2", - "@types/ws": "8.5.12", + "@types/ws": "8.5.13", "graphql-middleware": "6.1.35", "graphql-tag": "2.12.6", "graphql-ws": "5.16.0", @@ -64,7 +64,7 @@ "koa-jwt": "4.0.4", "koa-router": "13.0.1", "mock-jwks": "1.0.10", - "nock": "13.5.5", + "nock": "13.5.6", "randomstring": "1.3.0", "rimraf": "5.0.10", "supertest": "7.0.0", diff --git a/packages/graphql/src/classes/Node.ts b/packages/graphql/src/classes/Node.ts index eab5d1636f..2e4e95c291 100644 --- a/packages/graphql/src/classes/Node.ts +++ b/packages/graphql/src/classes/Node.ts @@ -70,9 +70,13 @@ export interface NodeConstructor extends GraphElementConstructor { globalIdFieldIsInt?: boolean; } -type MutableField = PrimitiveField | CustomScalarField | CustomEnumField | UnionField | TemporalField | CypherField; - -type AuthableField = PrimitiveField | CustomScalarField | CustomEnumField | UnionField | TemporalField | CypherField; +export type MutableField = + | PrimitiveField + | CustomScalarField + | CustomEnumField + | UnionField + | TemporalField + | CypherField; export type RootTypeFieldNames = { create: string; @@ -161,7 +165,7 @@ class Node extends GraphElement { /** Fields you can apply auth allow and bind to */ // Maybe we can remove this as they may not be used anymore in the new auth system - public get authableFields(): AuthableField[] { + public get authableFields(): MutableField[] { return [ ...this.primitiveFields, ...this.scalarFields, diff --git a/packages/graphql/src/classes/Relationship.ts b/packages/graphql/src/classes/Relationship.ts index af2146c011..8a7afba549 100644 --- a/packages/graphql/src/classes/Relationship.ts +++ b/packages/graphql/src/classes/Relationship.ts @@ -18,21 +18,23 @@ */ import type { - PrimitiveField, - PointField, CustomEnumField, - CypherField, + CustomResolverField, CustomScalarField, + CypherField, + PointField, + PrimitiveField, TemporalField, - CustomResolverField, } from "../types"; import { GraphElement } from "./GraphElement"; +import type { MutableField } from "./Node"; interface RelationshipConstructor { name: string; type?: string; source: string; // temporary addition to infer the source using the schema model target: string; // temporary addition to infer the target using the schema model + relationshipFieldName: string; // temporary addition to infer the fieldName using the schema model description?: string; properties?: string; cypherFields?: CypherField[]; @@ -48,6 +50,7 @@ class Relationship extends GraphElement { public properties?: string; public source: string; public target: string; + public relationshipFieldName: string; constructor(input: RelationshipConstructor) { super({ @@ -65,6 +68,17 @@ class Relationship extends GraphElement { this.properties = input.properties; this.source = input.source; this.target = input.target; + this.relationshipFieldName = input.relationshipFieldName; + } + // Fields you can set in a create or update mutation + public get mutableFields(): MutableField[] { + return [ + ...this.temporalFields, + ...this.enumFields, + ...this.scalarFields, // these are just custom scalars + ...this.primitiveFields, // these are instead built-in scalars + ...this.pointFields, + ]; } } diff --git a/packages/graphql/src/schema/constants.ts b/packages/graphql/src/schema/constants.ts index 919a78193a..c733ab8718 100644 --- a/packages/graphql/src/schema/constants.ts +++ b/packages/graphql/src/schema/constants.ts @@ -39,3 +39,10 @@ export const DEPRECATE_DIRECTED_ARGUMENT = { reason: "The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server", }, }; + +export const DEPRECATE_IMPLICIT_SET = { + name: DEPRECATED, + args: { + reason: "Please use the explicit _SET field", + }, +}; diff --git a/packages/graphql/src/schema/create-connection-fields.ts b/packages/graphql/src/schema/create-connection-fields.ts index 8cf6c3c0bd..a9ceaacf64 100644 --- a/packages/graphql/src/schema/create-connection-fields.ts +++ b/packages/graphql/src/schema/create-connection-fields.ts @@ -55,6 +55,7 @@ export function createConnectionFields({ source: relationship.source.name, target: relationship.target.name, properties: relationship instanceof RelationshipAdapter ? relationship.propertiesTypeName : undefined, + relationshipFieldName: relationship.name, ...(relFields ? { temporalFields: relFields.temporalFields, diff --git a/packages/graphql/src/schema/create-relationship-fields/create-relationship-fields.ts b/packages/graphql/src/schema/create-relationship-fields/create-relationship-fields.ts index 6c42b0ba78..74ebc2b2a5 100644 --- a/packages/graphql/src/schema/create-relationship-fields/create-relationship-fields.ts +++ b/packages/graphql/src/schema/create-relationship-fields/create-relationship-fields.ts @@ -323,12 +323,7 @@ function createRelationshipFieldsForTarget({ ); composeNode.addFields( - augmentObjectOrInterfaceTypeWithConnectionField( - relationshipAdapter, - userDefinedFieldDirectives, - composer, - features - ) + augmentObjectOrInterfaceTypeWithConnectionField(relationshipAdapter, userDefinedFieldDirectives, composer) ); withRelationInputType({ diff --git a/packages/graphql/src/schema/generation/augment-object-or-interface.ts b/packages/graphql/src/schema/generation/augment-object-or-interface.ts index 37d2252553..5af50e26c8 100644 --- a/packages/graphql/src/schema/generation/augment-object-or-interface.ts +++ b/packages/graphql/src/schema/generation/augment-object-or-interface.ts @@ -113,8 +113,7 @@ export function augmentObjectOrInterfaceTypeWithRelationshipField({ export function augmentObjectOrInterfaceTypeWithConnectionField( relationshipAdapter: RelationshipAdapter | RelationshipDeclarationAdapter, userDefinedFieldDirectives: Map, - schemaComposer: SchemaComposer, - features: Neo4jFeaturesSettings | undefined + schemaComposer: SchemaComposer ): Record { const fields = {}; const deprecatedDirectives = graphqlDirectivesToCompose( @@ -126,7 +125,6 @@ export function augmentObjectOrInterfaceTypeWithConnectionField( where: makeConnectionWhereInputType({ relationshipAdapter, composer: schemaComposer, - features, }), first: { type: GraphQLInt, diff --git a/packages/graphql/src/schema/generation/connection-where-input.ts b/packages/graphql/src/schema/generation/connection-where-input.ts index df87cb95a8..363d9665a4 100644 --- a/packages/graphql/src/schema/generation/connection-where-input.ts +++ b/packages/graphql/src/schema/generation/connection-where-input.ts @@ -30,17 +30,14 @@ import { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters import { UnionEntityAdapter } from "../../schema-model/entity/model-adapters/UnionEntityAdapter"; import { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; import type { RelationshipDeclarationAdapter } from "../../schema-model/relationship/model-adapters/RelationshipDeclarationAdapter"; -import type { Neo4jFeaturesSettings } from "../../types"; // tODO: refactor into smaller fns for unions, like disconnect-input export function makeConnectionWhereInputType({ relationshipAdapter, composer, - features, }: { relationshipAdapter: RelationshipAdapter | RelationshipDeclarationAdapter; composer: SchemaComposer; - features: Neo4jFeaturesSettings | undefined; }): InputTypeComposer { const typeName = relationshipAdapter.operations.getConnectionWhereTypename(); if (composer.has(typeName)) { @@ -54,7 +51,6 @@ export function makeConnectionWhereInputType({ relationshipAdapter, memberEntity: concreteEntity, composer, - features, }); connectionWhereITC.addFields({ @@ -66,7 +62,6 @@ export function makeConnectionWhereInputType({ return withConnectionWhereInputType({ relationshipAdapter, composer, - features, }); } @@ -74,12 +69,10 @@ export function withConnectionWhereInputType({ relationshipAdapter, memberEntity, composer, - features, }: { relationshipAdapter: RelationshipAdapter | RelationshipDeclarationAdapter; memberEntity?: ConcreteEntityAdapter; composer: SchemaComposer; - features: Neo4jFeaturesSettings | undefined; }): InputTypeComposer { const typeName = relationshipAdapter.operations.getConnectionWhereTypename(memberEntity); if (composer.has(typeName)) { diff --git a/packages/graphql/src/schema/generation/delete-input.ts b/packages/graphql/src/schema/generation/delete-input.ts index 9fa03aab23..1d7c4282ff 100644 --- a/packages/graphql/src/schema/generation/delete-input.ts +++ b/packages/graphql/src/schema/generation/delete-input.ts @@ -89,7 +89,6 @@ function makeDeleteInputType({ relationshipAdapter, composer, deprecatedDirectives, - features, }: { relationshipAdapter: RelationshipAdapter | RelationshipDeclarationAdapter; composer: SchemaComposer; @@ -97,9 +96,9 @@ function makeDeleteInputType({ features: Neo4jFeaturesSettings | undefined; }): InputTypeComposer | undefined { if (relationshipAdapter.target instanceof UnionEntityAdapter) { - return withUnionDeleteInputType({ relationshipAdapter, composer, deprecatedDirectives, features }); + return withUnionDeleteInputType({ relationshipAdapter, composer, deprecatedDirectives }); } - return withDeleteFieldInputType({ relationshipAdapter, composer, features }); + return withDeleteFieldInputType({ relationshipAdapter, composer }); } function makeDeleteInputTypeRelationshipField({ relationshipAdapter, @@ -130,12 +129,10 @@ export function withUnionDeleteInputType({ relationshipAdapter, composer, deprecatedDirectives, - features, }: { relationshipAdapter: RelationshipAdapter | RelationshipDeclarationAdapter; composer: SchemaComposer; deprecatedDirectives: Directive[]; - features: Neo4jFeaturesSettings | undefined; }): InputTypeComposer | undefined { const typeName = relationshipAdapter.operations.unionDeleteInputTypeName; if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.DELETE)) { @@ -144,7 +141,7 @@ export function withUnionDeleteInputType({ if (composer.has(typeName)) { return composer.getITC(typeName); } - const fields = makeUnionDeleteInputTypeFields({ relationshipAdapter, composer, deprecatedDirectives, features }); + const fields = makeUnionDeleteInputTypeFields({ relationshipAdapter, composer, deprecatedDirectives }); if (!Object.keys(fields).length) { return; } @@ -159,12 +156,10 @@ function makeUnionDeleteInputTypeFields({ relationshipAdapter, composer, deprecatedDirectives, - features, }: { relationshipAdapter: RelationshipAdapter | RelationshipDeclarationAdapter; composer: SchemaComposer; deprecatedDirectives: Directive[]; - features: Neo4jFeaturesSettings | undefined; }): InputTypeComposerFieldConfigMapDefinition { const fields: InputTypeComposerFieldConfigMapDefinition = {}; if (!(relationshipAdapter.target instanceof UnionEntityAdapter)) { @@ -175,7 +170,6 @@ function makeUnionDeleteInputTypeFields({ relationshipAdapter, ifUnionMemberEntity: memberEntity, composer, - features, }); if (fieldInput) { fields[memberEntity.name] = { @@ -191,12 +185,10 @@ export function withDeleteFieldInputType({ relationshipAdapter, composer, ifUnionMemberEntity, - features, }: { relationshipAdapter: RelationshipAdapter | RelationshipDeclarationAdapter; composer: SchemaComposer; ifUnionMemberEntity?: ConcreteEntityAdapter; - features: Neo4jFeaturesSettings | undefined; }): InputTypeComposer | undefined { const typeName = relationshipAdapter.operations.getDeleteFieldInputTypeName(ifUnionMemberEntity); if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.DELETE)) { @@ -207,7 +199,7 @@ export function withDeleteFieldInputType({ } const disconnectFieldInput = composer.createInputTC({ name: typeName, - fields: makeDeleteFieldInputTypeFields({ relationshipAdapter, composer, ifUnionMemberEntity, features }), + fields: makeDeleteFieldInputTypeFields({ relationshipAdapter, composer, ifUnionMemberEntity }), }); return disconnectFieldInput; } @@ -215,12 +207,10 @@ function makeDeleteFieldInputTypeFields({ relationshipAdapter, composer, ifUnionMemberEntity, - features, }: { relationshipAdapter: RelationshipAdapter | RelationshipDeclarationAdapter; composer: SchemaComposer; ifUnionMemberEntity?: ConcreteEntityAdapter; - features: Neo4jFeaturesSettings | undefined; }): InputTypeComposerFieldConfigMapDefinition { const fields = {}; if (relationshipAdapter.target instanceof ConcreteEntityAdapter) { @@ -254,7 +244,6 @@ function makeDeleteFieldInputTypeFields({ relationshipAdapter, memberEntity: ifUnionMemberEntity, composer, - features, }); if (ifUnionMemberEntity.relationships.size) { const deleteInput = withDeleteInputType({ entityAdapter: ifUnionMemberEntity, composer }); diff --git a/packages/graphql/src/schema/generation/disconnect-input.ts b/packages/graphql/src/schema/generation/disconnect-input.ts index 759c33a4cf..167fc8da02 100644 --- a/packages/graphql/src/schema/generation/disconnect-input.ts +++ b/packages/graphql/src/schema/generation/disconnect-input.ts @@ -196,7 +196,6 @@ export function withDisconnectFieldInputType({ relationshipAdapter, composer, ifUnionMemberEntity, - features, }: { relationshipAdapter: RelationshipAdapter | RelationshipDeclarationAdapter; composer: SchemaComposer; @@ -212,20 +211,19 @@ export function withDisconnectFieldInputType({ } const disconnectFieldInput = composer.createInputTC({ name: typeName, - fields: makeDisconnectFieldInputTypeFields({ relationshipAdapter, composer, ifUnionMemberEntity, features }), + fields: makeDisconnectFieldInputTypeFields({ relationshipAdapter, composer, ifUnionMemberEntity }), }); return disconnectFieldInput; } + function makeDisconnectFieldInputTypeFields({ relationshipAdapter, composer, ifUnionMemberEntity, - features, }: { relationshipAdapter: RelationshipAdapter | RelationshipDeclarationAdapter; composer: SchemaComposer; ifUnionMemberEntity?: ConcreteEntityAdapter; - features: Neo4jFeaturesSettings | undefined; }): InputTypeComposerFieldConfigMapDefinition { const fields = {}; if (relationshipAdapter.target instanceof ConcreteEntityAdapter) { @@ -260,7 +258,6 @@ function makeDisconnectFieldInputTypeFields({ relationshipAdapter, memberEntity: ifUnionMemberEntity, composer, - features, }); if (ifUnionMemberEntity.relationships.size) { diff --git a/packages/graphql/src/schema/generation/update-input.ts b/packages/graphql/src/schema/generation/update-input.ts index bb5c028528..dc4b5e4772 100644 --- a/packages/graphql/src/schema/generation/update-input.ts +++ b/packages/graphql/src/schema/generation/update-input.ts @@ -44,10 +44,12 @@ export function withUpdateInputType({ entityAdapter, userDefinedFieldDirectives, composer, + features, }: { entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | RelationshipAdapter; userDefinedFieldDirectives: Map; composer: SchemaComposer; + features?: Neo4jFeaturesSettings; }): InputTypeComposer { const inputTypeName = entityAdapter instanceof RelationshipAdapter @@ -64,10 +66,12 @@ export function withUpdateInputType({ if (entityAdapter instanceof ConcreteEntityAdapter || entityAdapter instanceof RelationshipAdapter) { updateInputType.addFields( - concreteEntityToUpdateInputFields(entityAdapter.updateInputFields, userDefinedFieldDirectives, [ - withMathOperators(), - withArrayOperators(), - ]) + concreteEntityToUpdateInputFields({ + objectFields: entityAdapter.updateInputFields, + userDefinedFieldDirectives, + additionalFieldsCallbacks: [withMathOperators(), withArrayOperators()], + features, + }) ); } else { const hasNestedRelationships = entityAdapter.relationshipDeclarations.size > 0; @@ -77,9 +81,12 @@ export function withUpdateInputType({ } updateInputType.addFields( - concreteEntityToUpdateInputFields(entityAdapter.updateInputFields, userDefinedFieldDirectives, [ - withMathOperators(), - ]) + concreteEntityToUpdateInputFields({ + objectFields: entityAdapter.updateInputFields, + userDefinedFieldDirectives, + additionalFieldsCallbacks: [withMathOperators()], + features, + }) ); } return updateInputType; @@ -238,7 +245,6 @@ function makeUpdateFieldInputTypeFields({ relationshipAdapter, memberEntity: ifUnionMemberEntity, composer, - features, }); } if (connectionWhereInputType) { @@ -295,7 +301,6 @@ function makeUpdateFieldInputTypeFields({ relationshipAdapter, ifUnionMemberEntity, composer, - features, }); if (deleteFieldInputType) { fields["delete"] = { diff --git a/packages/graphql/src/schema/make-augmented-schema.ts b/packages/graphql/src/schema/make-augmented-schema.ts index 8b5abf0a27..d6a8de17f1 100644 --- a/packages/graphql/src/schema/make-augmented-schema.ts +++ b/packages/graphql/src/schema/make-augmented-schema.ts @@ -519,7 +519,7 @@ function generateObjectType({ augmentVectorSchema({ composer, concreteEntityAdapter, features }); withUniqueWhereInputType({ concreteEntityAdapter, composer }); withCreateInputType({ entityAdapter: concreteEntityAdapter, userDefinedFieldDirectives, composer }); - withUpdateInputType({ entityAdapter: concreteEntityAdapter, userDefinedFieldDirectives, composer }); + withUpdateInputType({ entityAdapter: concreteEntityAdapter, userDefinedFieldDirectives, composer, features }); withMutationResponseTypes({ concreteEntityAdapter, propagatedDirectives, composer }); const composeNode = withObjectType({ entityAdapter: concreteEntityAdapter, @@ -602,7 +602,6 @@ function generateObjectType({ if (concreteEntityAdapter.isDeletable) { composer.Mutation.addFields({ [concreteEntityAdapter.operations.rootTypeFieldNames.delete]: deleteResolver({ - node, composer, concreteEntityAdapter, }), @@ -617,9 +616,7 @@ function generateObjectType({ composer.Mutation.addFields({ [concreteEntityAdapter.operations.rootTypeFieldNames.update]: updateResolver({ node, - composer, concreteEntityAdapter, - features, }), }); composer.Mutation.setFieldDirectives( @@ -662,7 +659,7 @@ function generateInterfaceObjectType({ composer, }); withCreateInputType({ entityAdapter: interfaceEntityAdapter, userDefinedFieldDirectives, composer }); - withUpdateInputType({ entityAdapter: interfaceEntityAdapter, userDefinedFieldDirectives, composer }); + withUpdateInputType({ entityAdapter: interfaceEntityAdapter, userDefinedFieldDirectives, composer, features }); const composeInterface = withInterfaceType({ interfaceEntityAdapter, diff --git a/packages/graphql/src/schema/resolvers/mutation/delete.test.ts b/packages/graphql/src/schema/resolvers/mutation/delete.test.ts index 68bd55ccb3..18ea10a370 100644 --- a/packages/graphql/src/schema/resolvers/mutation/delete.test.ts +++ b/packages/graphql/src/schema/resolvers/mutation/delete.test.ts @@ -18,17 +18,12 @@ */ import { SchemaComposer } from "graphql-compose"; -import { NodeBuilder } from "../../../../tests/utils/builders/node-builder"; import { ConcreteEntity } from "../../../schema-model/entity/ConcreteEntity"; import { ConcreteEntityAdapter } from "../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import { deleteResolver } from "./delete"; describe("Delete resolver", () => { test("should return the correct; type, args and resolve", () => { - const node = new NodeBuilder({ - name: "Movie", - relationFields: [], - }).instance(); const concreteEntity = new ConcreteEntity({ name: "Movie", labels: ["Movie"], @@ -42,7 +37,7 @@ describe("Delete resolver", () => { const composer = new SchemaComposer(); - const result = deleteResolver({ node, composer, concreteEntityAdapter }); + const result = deleteResolver({ composer, concreteEntityAdapter }); expect(result.type).toBe(`DeleteInfo!`); expect(result.resolve).toBeInstanceOf(Function); expect(result.args).toMatchObject({ diff --git a/packages/graphql/src/schema/resolvers/mutation/delete.ts b/packages/graphql/src/schema/resolvers/mutation/delete.ts index e5eb357cab..394c5ff5b2 100644 --- a/packages/graphql/src/schema/resolvers/mutation/delete.ts +++ b/packages/graphql/src/schema/resolvers/mutation/delete.ts @@ -19,7 +19,6 @@ import type { GraphQLResolveInfo } from "graphql"; import type { SchemaComposer } from "graphql-compose"; -import type { Node } from "../../../classes"; import type { ConcreteEntityAdapter } from "../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import { translateDelete } from "../../../translate"; import type { Neo4jGraphQLTranslationContext } from "../../../types/neo4j-graphql-translation-context"; @@ -28,11 +27,9 @@ import getNeo4jResolveTree from "../../../utils/get-neo4j-resolve-tree"; import type { Neo4jGraphQLComposedContext } from "../composition/wrap-query-and-mutation"; export function deleteResolver({ - node, composer, concreteEntityAdapter, }: { - node: Node; composer: SchemaComposer; concreteEntityAdapter: ConcreteEntityAdapter; }) { @@ -43,7 +40,6 @@ export function deleteResolver({ const { cypher, params } = translateDelete({ context: context as Neo4jGraphQLTranslationContext, - node, entityAdapter: concreteEntityAdapter, }); const executeResult = await execute({ diff --git a/packages/graphql/src/schema/resolvers/mutation/update.test.ts b/packages/graphql/src/schema/resolvers/mutation/update.test.ts index 85b37a10c9..d7899edc37 100644 --- a/packages/graphql/src/schema/resolvers/mutation/update.test.ts +++ b/packages/graphql/src/schema/resolvers/mutation/update.test.ts @@ -17,7 +17,6 @@ * limitations under the License. */ -import { SchemaComposer } from "graphql-compose"; import { NodeBuilder } from "../../../../tests/utils/builders/node-builder"; import { ConcreteEntity } from "../../../schema-model/entity/ConcreteEntity"; import { ConcreteEntityAdapter } from "../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; @@ -41,13 +40,7 @@ describe("Update resolver", () => { }); const concreteEntityAdapter = new ConcreteEntityAdapter(concreteEntity); - const composer = new SchemaComposer(); - composer.createInputTC("MovieRelationInput"); - composer.createInputTC("MovieDeleteInput"); - composer.createInputTC("MovieConnectInput"); - composer.createInputTC("MovieDisconnectInput"); - - const result = updateResolver({ node, composer, concreteEntityAdapter }); + const result = updateResolver({ node, concreteEntityAdapter }); expect(result.type).toBe("UpdateMoviesMutationResponse!"); expect(result.resolve).toBeInstanceOf(Function); expect(result.args).toMatchObject({ @@ -72,11 +65,7 @@ describe("Update resolver", () => { }); const concreteEntityAdapter = new ConcreteEntityAdapter(concreteEntity); - const composer = new SchemaComposer(); - composer.createInputTC("MovieConnectInput"); - composer.createInputTC("MovieDisconnectInput"); - - const result = updateResolver({ node, composer, concreteEntityAdapter }); + const result = updateResolver({ node, concreteEntityAdapter }); expect(result.type).toBe("UpdateMoviesMutationResponse!"); expect(result.resolve).toBeInstanceOf(Function); diff --git a/packages/graphql/src/schema/resolvers/mutation/update.ts b/packages/graphql/src/schema/resolvers/mutation/update.ts index 469178976f..366b6dc0d0 100644 --- a/packages/graphql/src/schema/resolvers/mutation/update.ts +++ b/packages/graphql/src/schema/resolvers/mutation/update.ts @@ -21,12 +21,10 @@ import { Kind, type FieldNode, type GraphQLResolveInfo } from "graphql"; import type { ObjectTypeComposerArgumentConfigAsObjectDefinition, ObjectTypeComposerFieldConfigAsObjectDefinition, - SchemaComposer, } from "graphql-compose"; import type { Node } from "../../../classes"; import type { ConcreteEntityAdapter } from "../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import { translateUpdate } from "../../../translate"; -import type { Neo4jFeaturesSettings } from "../../../types"; import type { Neo4jGraphQLTranslationContext } from "../../../types/neo4j-graphql-translation-context"; import { execute } from "../../../utils"; import getNeo4jResolveTree from "../../../utils/get-neo4j-resolve-tree"; @@ -34,14 +32,10 @@ import type { Neo4jGraphQLComposedContext } from "../composition/wrap-query-and- export function updateResolver({ node, - composer, concreteEntityAdapter, - features, }: { node: Node; - composer: SchemaComposer; concreteEntityAdapter: ConcreteEntityAdapter; - features?: Neo4jFeaturesSettings; }): ObjectTypeComposerFieldConfigAsObjectDefinition { async function resolve(_root: any, args: any, context: Neo4jGraphQLComposedContext, info: GraphQLResolveInfo) { const resolveTree = getNeo4jResolveTree(info, { args }); diff --git a/packages/graphql/src/schema/to-compose.ts b/packages/graphql/src/schema/to-compose.ts index fce74695d8..e1643d8a6f 100644 --- a/packages/graphql/src/schema/to-compose.ts +++ b/packages/graphql/src/schema/to-compose.ts @@ -30,7 +30,9 @@ import type { Argument } from "../schema-model/argument/Argument"; import { ArgumentAdapter } from "../schema-model/argument/model-adapters/ArgumentAdapter"; import type { AttributeAdapter } from "../schema-model/attribute/model-adapters/AttributeAdapter"; import { parseValueNode } from "../schema-model/parser/parse-value-node"; -import type { InputField } from "../types"; +import type { InputField, Neo4jFeaturesSettings } from "../types"; +import { DEPRECATE_IMPLICIT_SET } from "./constants"; +import { shouldAddDeprecatedFields } from "./generation/utils"; import { idResolver } from "./resolvers/field/id"; import { numericalResolver } from "./resolvers/field/numerical"; @@ -125,11 +127,17 @@ export function concreteEntityToCreateInputFields( return createInputFields; } -export function concreteEntityToUpdateInputFields( - objectFields: AttributeAdapter[], - userDefinedFieldDirectives: Map, - additionalFieldsCallbacks: AdditionalFieldsCallback[] = [] -) { +export function concreteEntityToUpdateInputFields({ + objectFields, + userDefinedFieldDirectives, + additionalFieldsCallbacks = [], + features, +}: { + objectFields: AttributeAdapter[]; + userDefinedFieldDirectives: Map; + additionalFieldsCallbacks: AdditionalFieldsCallback[]; + features?: Neo4jFeaturesSettings; +}) { let updateInputFields: InputTypeComposerFieldConfigMapDefinition = {}; for (const field of objectFields) { const newInputField: InputField = { @@ -143,8 +151,14 @@ export function concreteEntityToUpdateInputFields( userDefinedDirectivesOnField.filter((directive) => directive.name.value === DEPRECATED) ); } + if (shouldAddDeprecatedFields(features, "implicitSet")) { + updateInputFields[field.name] = { + type: newInputField.type, + directives: newInputField.directives?.length ? newInputField.directives : [DEPRECATE_IMPLICIT_SET], + }; + } - updateInputFields[field.name] = newInputField; + updateInputFields[`${field.name}_SET`] = newInputField; for (const cb of additionalFieldsCallbacks) { const additionalFields = cb(field, newInputField); diff --git a/packages/graphql/src/translate/create-connect-and-params.ts b/packages/graphql/src/translate/create-connect-and-params.ts index b06b8db3cd..abae9e5db2 100644 --- a/packages/graphql/src/translate/create-connect-and-params.ts +++ b/packages/graphql/src/translate/create-connect-and-params.ts @@ -34,7 +34,7 @@ import { checkAuthentication } from "./authorization/check-authentication"; import { createAuthorizationAfterAndParams } from "./authorization/compatibility/create-authorization-after-and-params"; import { createAuthorizationBeforeAndParams } from "./authorization/compatibility/create-authorization-before-and-params"; import { createRelationshipValidationString } from "./create-relationship-validation-string"; -import createSetRelationshipPropertiesAndParams from "./create-set-relationship-properties-and-params"; +import { createSetRelationshipProperties } from "./create-set-relationship-properties"; import { filterMetaVariable } from "./subscriptions/filter-meta-variable"; import { createWhereNodePredicate } from "./where/create-where-predicate"; @@ -181,15 +181,32 @@ function createConnectAndParams({ const relationship = context.relationships.find( (x) => x.properties === relationField.properties ) as unknown as Relationship; - const setA = createSetRelationshipPropertiesAndParams({ + + const sourceAdapter = context.schemaModel.getConcreteEntityAdapter(relationship.source); + if (!sourceAdapter) { + throw new Error(`Transpile error: Entity with name ${relationship.source} not found`); + } + const relationshipAdapter = sourceAdapter.relationships.get(relationship.relationshipFieldName); + if (!relationshipAdapter) { + throw new Error( + `Transpile error: Relationship with name ${relationship.relationshipFieldName} not found` + ); + } + const setA = createSetRelationshipProperties({ properties: connect.edge ?? {}, varName: relationshipName, relationship, + relationshipAdapter: relationshipAdapter, operation: "CREATE", callbackBucket, + withVars, + parameterPrefix: relationshipName, + parameterNotation: "_", }); - subquery.push(`\t\t\t${setA[0]}`); - params = { ...params, ...setA[1] }; + if (setA) { + subquery.push(`\t\t\t${setA[0]}`); + params = { ...params, ...setA[1] }; + } } subquery.push("\t\t}"); diff --git a/packages/graphql/src/translate/create-create-and-params.ts b/packages/graphql/src/translate/create-create-and-params.ts index c3b2d365cc..96cdca27bb 100644 --- a/packages/graphql/src/translate/create-create-and-params.ts +++ b/packages/graphql/src/translate/create-create-and-params.ts @@ -19,9 +19,7 @@ import type { Node, Relationship } from "../classes"; import type { CallbackBucket } from "../classes/CallbackBucket"; -import { Neo4jGraphQLError } from "../classes/Error"; import type { Neo4jGraphQLTranslationContext } from "../types/neo4j-graphql-translation-context"; -import { findConflictingProperties } from "../utils/find-conflicting-properties"; import mapToDbProperty from "../utils/map-to-db-property"; import { checkAuthentication } from "./authorization/check-authentication"; import { @@ -30,7 +28,8 @@ import { } from "./authorization/compatibility/create-authorization-after-and-params"; import createConnectAndParams from "./create-connect-and-params"; import { createRelationshipValidationString } from "./create-relationship-validation-string"; -import createSetRelationshipPropertiesAndParams from "./create-set-relationship-properties-and-params"; +import { createSetRelationshipProperties } from "./create-set-relationship-properties"; +import { assertNonAmbiguousUpdate } from "./utils/assert-non-ambiguous-update"; import { addCallbackAndSetParam } from "./utils/callback-utils"; interface Res { @@ -73,14 +72,7 @@ function createCreateAndParams({ //used to build authorization variable in auth subqueries authorizationPrefix?: number[]; }): CreateAndParams { - const conflictingProperties = findConflictingProperties({ node, input }); - if (conflictingProperties.length > 0) { - throw new Neo4jGraphQLError( - `Conflicting modification of ${conflictingProperties.map((n) => `[[${n}]]`).join(", ")} on type ${ - node.name - }` - ); - } + assertNonAmbiguousUpdate(node, input); checkAuthentication({ context, node, targetOperations: ["CREATE"] }); function reducer(res: Res, [key, value]: [string, any], reducerIndex): Res { @@ -170,15 +162,20 @@ function createCreateAndParams({ (x) => x.properties === relationField.properties ) as unknown as Relationship; - const setA = createSetRelationshipPropertiesAndParams({ + const setA = createSetRelationshipProperties({ properties: create.edge ?? {}, varName: propertiesName, + withVars, relationship, operation: "CREATE", callbackBucket, + parameterPrefix: propertiesName, + parameterNotation: "_", }); - res.creates.push(setA[0]); - res.params = { ...res.params, ...setA[1] }; + if (setA) { + res.creates.push(setA[0]); + res.params = { ...res.params, ...setA[1] }; + } } if (authorizationPredicates.length) { diff --git a/packages/graphql/src/translate/create-set-relationship-properties-and-params.ts b/packages/graphql/src/translate/create-set-relationship-properties-and-params.ts deleted file mode 100644 index 49eb9a1698..0000000000 --- a/packages/graphql/src/translate/create-set-relationship-properties-and-params.ts +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import type { Relationship } from "../classes"; -import type { CallbackBucket } from "../classes/CallbackBucket"; -import mapToDbProperty from "../utils/map-to-db-property"; -import { addCallbackAndSetParam } from "./utils/callback-utils"; - -/* - TODO - lets reuse this function for setting either node or rel properties. - This was not reused due to the large differences between node fields - - and relationship fields. -*/ -function createSetRelationshipPropertiesAndParams({ - properties, - varName, - relationship, - operation, - callbackBucket, -}: { - properties: Record; - varName: string; - relationship: Relationship; - operation: "CREATE" | "UPDATE"; - callbackBucket: CallbackBucket; -}): [string, any] { - const strs: string[] = []; - const params = {}; - - const propertiesObj = - relationship.properties && properties[relationship.properties] - ? (properties[relationship.properties] as Record) - : properties; - - relationship.primitiveFields.forEach((primitiveField) => { - if (primitiveField?.autogenerate) { - if (operation === "CREATE") { - strs.push(`SET ${varName}.${primitiveField.dbPropertyName} = randomUUID()`); - } - } - }); - - relationship.temporalFields.forEach((temporalField) => { - if ( - ["DateTime", "Time"].includes(temporalField.typeMeta.name) && - temporalField?.timestamps?.includes(operation) - ) { - // DateTime -> datetime(); Time -> time() - strs.push( - `SET ${varName}.${temporalField.dbPropertyName} = ${temporalField.typeMeta.name.toLowerCase()}()` - ); - } - }); - - [...relationship.primitiveFields, ...relationship.temporalFields].forEach((field) => - addCallbackAndSetParam(field, varName, propertiesObj, callbackBucket, strs, operation) - ); - - Object.entries(propertiesObj).forEach(([key, value]) => { - const paramName = `${varName}_${key}`; - - const pointField = relationship.pointFields.find((x) => x.fieldName === key); - if (pointField) { - if (pointField.typeMeta.array) { - strs.push(`SET ${varName}.${pointField.dbPropertyName} = [p in $${paramName} | point(p)]`); - } else { - strs.push(`SET ${varName}.${pointField.dbPropertyName} = point($${paramName})`); - } - - params[paramName] = value; - - return; - } - - const dbFieldName = mapToDbProperty(relationship, key); - strs.push(`SET ${varName}.${dbFieldName} = $${paramName}`); - params[paramName] = value; - }); - - return [strs.join("\n"), params]; -} - -export default createSetRelationshipPropertiesAndParams; diff --git a/packages/graphql/src/translate/create-set-relationship-properties.ts b/packages/graphql/src/translate/create-set-relationship-properties.ts index 82f3a47bd9..3d88ed0703 100644 --- a/packages/graphql/src/translate/create-set-relationship-properties.ts +++ b/packages/graphql/src/translate/create-set-relationship-properties.ts @@ -17,14 +17,14 @@ * limitations under the License. */ -import type { Relationship } from "../classes"; +import { type Relationship } from "../classes"; import type { CallbackBucket } from "../classes/CallbackBucket"; import type { RelationshipAdapter } from "../schema-model/relationship/model-adapters/RelationshipAdapter"; -import mapToDbProperty from "../utils/map-to-db-property"; +import { assertNonAmbiguousUpdate } from "./utils/assert-non-ambiguous-update"; import { addCallbackAndSetParam } from "./utils/callback-utils"; -import { buildMathStatements, matchMathField, mathDescriptorBuilder } from "./utils/math"; +import { getMutationFieldStatements } from "./utils/get-mutation-field-statements"; -function createSetRelationshipProperties({ +export function createSetRelationshipProperties({ properties, varName, withVars, @@ -33,6 +33,7 @@ function createSetRelationshipProperties({ operation, callbackBucket, parameterPrefix, + parameterNotation, }: { properties: Record>; varName: string; @@ -42,7 +43,8 @@ function createSetRelationshipProperties({ operation: "CREATE" | "UPDATE"; callbackBucket: CallbackBucket; parameterPrefix: string; -}): string | undefined { + parameterNotation: "." | "_"; +}): [string, Record] | undefined { // setting properties on the edge of an Interface relationship // the input can contain other properties than the one applicable for this concrete entity relationship field if (Object.keys(properties).find((k) => relationshipAdapter?.siblings?.includes(k))) { @@ -55,7 +57,8 @@ function createSetRelationshipProperties({ relationship, operation, callbackBucket, - parameterPrefix: `${parameterPrefix}.${relationship.properties}`, + parameterPrefix: `${parameterPrefix}${parameterNotation}${relationship.properties}`, + parameterNotation, }); } return; @@ -68,14 +71,10 @@ function createSetRelationshipProperties({ operation, callbackBucket, parameterPrefix, + parameterNotation, }); } -/* - TODO - lets reuse this function for setting either node or rel properties. - This was not reused due to the large differences between node fields - - and relationship fields. -*/ function createSetRelationshipPropertiesForProperties({ properties, varName, @@ -84,6 +83,7 @@ function createSetRelationshipPropertiesForProperties({ operation, callbackBucket, parameterPrefix, + parameterNotation, }: { properties: Record; varName: string; @@ -92,9 +92,45 @@ function createSetRelationshipPropertiesForProperties({ operation: "CREATE" | "UPDATE"; callbackBucket: CallbackBucket; parameterPrefix: string; -}): string { + parameterNotation: "." | "_"; +}): [string, Record] { + assertNonAmbiguousUpdate(relationship, properties); const strs: string[] = []; + const params = {}; + + addAutogenerateProperties({ relationship, operation, varName, strs }); + [...relationship.primitiveFields, ...relationship.temporalFields].forEach((field) => + addCallbackAndSetParam(field, varName, properties, callbackBucket, strs, operation) + ); + + Object.entries(properties).forEach(([key, value], _idx) => { + const param = `${parameterPrefix}${parameterNotation}${key}`; + const mutationFieldStatements = getMutationFieldStatements({ + nodeOrRel: relationship, + param, + key, + varName, + value, + withVars, + }); + strs.push(mutationFieldStatements); + params[param] = value; + }); + return [strs.join("\n"), params]; +} + +function addAutogenerateProperties({ + relationship, + operation, + varName, + strs, +}: { + relationship: Relationship; + operation: "CREATE" | "UPDATE"; + varName: string; + strs: string[]; +}) { relationship.primitiveFields.forEach((primitiveField) => { if (primitiveField?.autogenerate) { if (operation === "CREATE") { @@ -114,91 +150,4 @@ function createSetRelationshipPropertiesForProperties({ ); } }); - - [...relationship.primitiveFields, ...relationship.temporalFields].forEach((field) => - addCallbackAndSetParam(field, varName, properties, callbackBucket, strs, operation) - ); - - Object.entries(properties).forEach(([key, value], _idx, propertiesEntries) => { - const paramName = `${parameterPrefix}.${key}`; - - const pointField = relationship.pointFields.find((x) => x.fieldName === key); - if (pointField) { - if (pointField.typeMeta.array) { - strs.push(`SET ${varName}.${pointField.dbPropertyName} = [p in $${paramName} | point(p)]`); - } else { - strs.push(`SET ${varName}.${pointField.dbPropertyName} = point($${paramName})`); - } - - return; - } - - const arrayPushField = relationship.primitiveFields.find((x) => `${x.fieldName}_PUSH` === key); - if (arrayPushField && arrayPushField.dbPropertyName) { - assertNonAmbiguousUpdate(propertiesEntries, arrayPushField.dbPropertyName); - - strs.push( - `SET ${varName}.${arrayPushField.dbPropertyName} = ${varName}.${arrayPushField.dbPropertyName} + $${paramName}` - ); - - return; - } - - const pointArrayPushField = relationship.pointFields.find((x) => `${x.fieldName}_PUSH` === key); - if (pointArrayPushField && pointArrayPushField.dbPropertyName) { - assertNonAmbiguousUpdate(propertiesEntries, pointArrayPushField.dbPropertyName); - - strs.push( - `SET ${varName}.${pointArrayPushField.dbPropertyName} = ${varName}.${pointArrayPushField.dbPropertyName} + [p in $${paramName} | point(p)]` - ); - - return; - } - - const arrayPopField = relationship.primitiveFields.find((x) => `${x.fieldName}_POP` === key); - if (arrayPopField && arrayPopField.dbPropertyName) { - assertNonAmbiguousUpdate(propertiesEntries, arrayPopField.dbPropertyName); - - strs.push( - `SET ${varName}.${arrayPopField.dbPropertyName} = ${varName}.${arrayPopField.dbPropertyName}[0..-$${paramName}]` - ); - - return; - } - - const pointArrayPopField = relationship.pointFields.find((x) => `${x.fieldName}_POP` === key); - if (pointArrayPopField && pointArrayPopField.dbPropertyName) { - assertNonAmbiguousUpdate(propertiesEntries, pointArrayPopField.dbPropertyName); - - strs.push( - `SET ${varName}.${pointArrayPopField.dbPropertyName} = ${varName}.${pointArrayPopField.dbPropertyName}[0..-$${paramName}]` - ); - - return; - } - - const mathMatch = matchMathField(key); - const { hasMatched } = mathMatch; - if (hasMatched) { - const mathDescriptor = mathDescriptorBuilder(value as number, relationship, mathMatch); - assertNonAmbiguousUpdate(propertiesEntries, mathDescriptor.dbName); - - const mathStatements = buildMathStatements(mathDescriptor, varName, withVars, paramName); - strs.push(...mathStatements); - return; - } - - const dbFieldName = mapToDbProperty(relationship, key); - strs.push(`SET ${varName}.${dbFieldName} = $${paramName}`); - }); - - return strs.join("\n"); - - function assertNonAmbiguousUpdate(propertiesEntries: [string, unknown][], propertyName: string) { - if (propertiesEntries.find(([entryKey]) => entryKey === propertyName)) { - throw new Error(`Cannot mutate the same field multiple times in one Mutation: ${propertyName}`); - } - } } - -export default createSetRelationshipProperties; diff --git a/packages/graphql/src/translate/create-update-and-params.ts b/packages/graphql/src/translate/create-update-and-params.ts index e1f088d405..8c84987876 100644 --- a/packages/graphql/src/translate/create-update-and-params.ts +++ b/packages/graphql/src/translate/create-update-and-params.ts @@ -20,13 +20,10 @@ import Cypher from "@neo4j/cypher-builder"; import pluralize from "pluralize"; import type { Node, Relationship } from "../classes"; -import { Neo4jGraphQLError } from "../classes"; import type { CallbackBucket } from "../classes/CallbackBucket"; import type { BaseField } from "../types"; import type { Neo4jGraphQLTranslationContext } from "../types/neo4j-graphql-translation-context"; import { caseWhere } from "../utils/case-where"; -import { findConflictingProperties } from "../utils/find-conflicting-properties"; -import mapToDbProperty from "../utils/map-to-db-property"; import { wrapStringInApostrophes } from "../utils/wrap-string-in-apostrophes"; import { checkAuthentication } from "./authorization/check-authentication"; import { @@ -42,11 +39,13 @@ import createCreateAndParams from "./create-create-and-params"; import createDeleteAndParams from "./create-delete-and-params"; import createDisconnectAndParams from "./create-disconnect-and-params"; import { createRelationshipValidationString } from "./create-relationship-validation-string"; -import createSetRelationshipProperties from "./create-set-relationship-properties"; +import { createSetRelationshipProperties } from "./create-set-relationship-properties"; +import { assertNonAmbiguousUpdate } from "./utils/assert-non-ambiguous-update"; import { addCallbackAndSetParam } from "./utils/callback-utils"; import { getAuthorizationStatements } from "./utils/get-authorization-statements"; +import { getMutationFieldStatements } from "./utils/get-mutation-field-statements"; import { indentBlock } from "./utils/indent-block"; -import { buildMathStatements, matchMathField, mathDescriptorBuilder } from "./utils/math"; +import { parseMutableField } from "./utils/parse-mutable-field"; import createConnectionWhereAndParams from "./where/create-connection-where-and-params"; interface Res { @@ -88,20 +87,12 @@ export default function createUpdateAndParams({ }): [string, any] { let hasAppliedTimeStamps = false; - const conflictingProperties = findConflictingProperties({ node, input: updateInput }); - if (conflictingProperties.length > 0) { - throw new Neo4jGraphQLError( - `Conflicting modification of ${conflictingProperties.map((n) => `[[${n}]]`).join(", ")} on type ${ - node.name - }` - ); - } + assertNonAmbiguousUpdate(node, updateInput); checkAuthentication({ context, node, targetOperations: ["UPDATE"] }); function reducer(res: Res, [key, value]: [string, any]) { let param: string; - if (chainStr) { param = `${chainStr}_${key}`; } else { @@ -109,8 +100,6 @@ export default function createUpdateAndParams({ } const relationField = node.relationFields.find((x) => key === x.fieldName); - const pointField = node.pointFields.find((x) => key === x.fieldName); - const dbFieldName = mapToDbProperty(node, key); if (relationField) { const refNodes: Node[] = []; @@ -273,7 +262,7 @@ export default function createUpdateAndParams({ const relationshipAdapter = entity ? entity.findRelationship(relationField.fieldName) : undefined; - const setProperties = createSetRelationshipProperties({ + const res = createSetRelationshipProperties({ properties: update.update.edge, varName: relationshipVariable, withVars: withVars, @@ -284,7 +273,12 @@ export default function createUpdateAndParams({ parameterPrefix: `${parameterPrefix}.${key}${ relationField.union ? `.${refNode.name}` : "" }${relationField.typeMeta.array ? `[${index}]` : ``}.update.edge`, + parameterNotation: ".", }); + let setProperties; + if (res) { + setProperties = res[0]; + } if (setProperties) { innerUpdate.push(setProperties); } @@ -459,9 +453,10 @@ export default function createUpdateAndParams({ parameterPrefix: `${parameterPrefix}.${key}${ relationField.union ? `.${refNode.name}` : "" }[${index}].create[${i}].edge`, + parameterNotation: ".", }); if (setA) { - subquery.push(setA); + subquery.push(setA[0]); } } @@ -524,45 +519,31 @@ export default function createUpdateAndParams({ addCallbackAndSetParam(field, varName, updateInput, callbackBucket, res.strs, "UPDATE") ); - const mathMatch = matchMathField(key); - const { hasMatched, propertyName } = mathMatch; - const settableFieldComparator = hasMatched ? propertyName : key; - const settableField = node.mutableFields.find((x) => x.fieldName === settableFieldComparator); - const authableField = node.authableFields.find( - (x) => x.fieldName === key || `${x.fieldName}_PUSH` === key || `${x.fieldName}_POP` === key - ); + const { settableField, operator } = parseMutableField(node, key); if (settableField) { if (settableField.typeMeta.required && value === null) { throw new Error(`Cannot set non-nullable field ${node.name}.${settableField.fieldName} to null`); } - - if (pointField) { - if (pointField.typeMeta.array) { - res.strs.push(`SET ${varName}.${dbFieldName} = [p in $${param} | point(p)]`); - } else { - res.strs.push(`SET ${varName}.${dbFieldName} = point($${param})`); - } - } else if (hasMatched) { - const mathDescriptor = mathDescriptorBuilder(value as number, node, mathMatch); - if (updateInput[mathDescriptor.dbName]) { - throw new Error( - `Cannot mutate the same field multiple times in one Mutation: ${mathDescriptor.dbName}` - ); - } - - const mathStatements = buildMathStatements(mathDescriptor, varName, withVars, param); - res.strs.push(...mathStatements); - } else { - res.strs.push(`SET ${varName}.${dbFieldName} = $${param}`); + checkAuthentication({ context, node, targetOperations: ["UPDATE"], field: settableField.fieldName }); + if (operator === "PUSH" || operator === "POP") { + validateNonNullProperty(res, varName, settableField); } + const mutationFieldStatements = getMutationFieldStatements({ + nodeOrRel: node, + param, + key, + varName, + value, + withVars, + }); + res.strs.push(mutationFieldStatements); + res.params[param] = value; - } - if (authableField) { const authorizationBeforeAndParams = createAuthorizationBeforeAndParamsField({ context, - nodes: [{ node: node, variable: varName, fieldName: authableField.fieldName }], + nodes: [{ node: node, variable: varName, fieldName: settableField.fieldName }], operations: ["UPDATE"], }); @@ -580,7 +561,7 @@ export default function createUpdateAndParams({ const authorizationAfterAndParams = createAuthorizationAfterAndParamsField({ context, - nodes: [{ node: node, variable: varName, fieldName: authableField.fieldName }], + nodes: [{ node: node, variable: varName, fieldName: settableField.fieldName }], operations: ["UPDATE"], }); @@ -597,55 +578,6 @@ export default function createUpdateAndParams({ } } - const pushSuffix = "_PUSH"; - const pushField = node.mutableFields.find((x) => `${x.fieldName}${pushSuffix}` === key); - if (pushField) { - if (pushField.dbPropertyName && updateInput[pushField.dbPropertyName]) { - throw new Error( - `Cannot mutate the same field multiple times in one Mutation: ${pushField.dbPropertyName}` - ); - } - - validateNonNullProperty(res, varName, pushField); - checkAuthentication({ context, node, targetOperations: ["UPDATE"], field: pushField.fieldName }); - - const pointArrayField = node.pointFields.find((x) => `${x.fieldName}_PUSH` === key); - if (pointArrayField) { - res.strs.push( - `SET ${varName}.${pushField.dbPropertyName} = ${varName}.${pushField.dbPropertyName} + [p in $${param} | point(p)]` - ); - } else { - res.strs.push( - `SET ${varName}.${pushField.dbPropertyName} = ${varName}.${pushField.dbPropertyName} + $${param}` - ); - } - - res.params[param] = value; - } - - const popSuffix = `_POP`; - const popField = node.mutableFields.find((x) => `${x.fieldName}${popSuffix}` === key); - if (popField) { - if (popField.dbPropertyName && updateInput[popField.dbPropertyName]) { - throw new Error( - `Cannot mutate the same field multiple times in one Mutation: ${popField.dbPropertyName}` - ); - } - - validateNonNullProperty(res, varName, popField); - checkAuthentication({ context, node, targetOperations: ["UPDATE"], field: popField.fieldName }); - - res.strs.push( - `SET ${varName}.${popField.dbPropertyName} = ${varName}.${popField.dbPropertyName}[0..-$${param}]` - ); - - res.params[param] = value; - } - - if (!pushField && !popField) { - checkAuthentication({ context, node, targetOperations: ["UPDATE"], field: key }); - } - return res; } diff --git a/packages/graphql/src/translate/queryAST/ast/filters/RelationshipFilter.ts b/packages/graphql/src/translate/queryAST/ast/filters/RelationshipFilter.ts index 7fe24c29c5..80a769b248 100644 --- a/packages/graphql/src/translate/queryAST/ast/filters/RelationshipFilter.ts +++ b/packages/graphql/src/translate/queryAST/ast/filters/RelationshipFilter.ts @@ -162,7 +162,7 @@ export class RelationshipFilter extends Filter { } protected getNestedSubqueries(context: QueryASTContext): Cypher.Clause[] { - const pattern = new Cypher.Pattern(context.source!) + const pattern = new Cypher.Pattern(context.source) .related({ direction: this.relationship.getCypherDirection(), type: this.relationship.type, @@ -289,7 +289,7 @@ export class RelationshipFilter extends Filter { throw new Error("No parent node found!"); } - const pattern = new Cypher.Pattern(nestedContext.source!) + const pattern = new Cypher.Pattern(nestedContext.source) .related({ type: this.relationship.type, direction: this.relationship.getCypherDirection(), diff --git a/packages/graphql/src/translate/queryAST/factory/parsers/is-unwind-create-supported.ts b/packages/graphql/src/translate/queryAST/factory/parsers/is-unwind-create-supported.ts index 1a7d8721f4..9ed58eaee3 100644 --- a/packages/graphql/src/translate/queryAST/factory/parsers/is-unwind-create-supported.ts +++ b/packages/graphql/src/translate/queryAST/factory/parsers/is-unwind-create-supported.ts @@ -44,10 +44,6 @@ export function isUnwindCreateSupported( createArgs: Record[], context: Neo4jGraphQLTranslationContext ): UnwindCreateSupported { - const isSubscriptionEnabled = checkSubscriptionEnabled(context); - if (!isSubscriptionEnabled.isSupported) { - return isSubscriptionEnabled; - } const isConcreteEntity = checkIsConcreteEntity(entityAdapter); if (!isConcreteEntity.isSupported) { return isConcreteEntity; @@ -89,10 +85,6 @@ export function isUnwindCreateSupported( }; } -function checkSubscriptionEnabled(context: Neo4jGraphQLTranslationContext): UnwindCreateSupported { - return SUPPORTED; -} - function checkIsConcreteEntity(entityAdapter: EntityAdapter): UnwindCreateSupported { if (!isConcreteEntity(entityAdapter)) { return { diff --git a/packages/graphql/src/translate/queryAST/factory/parsers/parse-mutation-field.test.ts b/packages/graphql/src/translate/queryAST/factory/parsers/parse-mutation-field.test.ts index 5bdd42ccd0..da2efdb4f8 100644 --- a/packages/graphql/src/translate/queryAST/factory/parsers/parse-mutation-field.test.ts +++ b/packages/graphql/src/translate/queryAST/factory/parsers/parse-mutation-field.test.ts @@ -34,7 +34,7 @@ describe("parseMutationField", () => { }); }); - test.each(["PUSH", "POP", "ADD", "SUBTRACT", "MULTIPLY", "DIVIDE", "INCREMENT", "DECREMENT"])( + test.each(["SET", "PUSH", "POP", "ADD", "SUBTRACT", "MULTIPLY", "DIVIDE", "INCREMENT", "DECREMENT"])( "title_%s", (operator) => { expect(parseMutationField(`title_${operator}`)).toEqual({ diff --git a/packages/graphql/src/translate/queryAST/factory/parsers/parse-mutation-field.ts b/packages/graphql/src/translate/queryAST/factory/parsers/parse-mutation-field.ts index 5c6e4d3086..0e87bbdc89 100644 --- a/packages/graphql/src/translate/queryAST/factory/parsers/parse-mutation-field.ts +++ b/packages/graphql/src/translate/queryAST/factory/parsers/parse-mutation-field.ts @@ -17,15 +17,24 @@ * limitations under the License. */ -type MutationOperation = "PUSH" | "POP" | "ADD" | "SUBTRACT" | "MULTIPLY" | "DIVIDE" | "INCREMENT" | "DECREMENT"; +export type MutationOperator = + | "SET" + | "PUSH" + | "POP" + | "ADD" + | "SUBTRACT" + | "MULTIPLY" + | "DIVIDE" + | "INCREMENT" + | "DECREMENT"; export type MutationRegexGroups = { fieldName: string; - operator: MutationOperation | undefined; + operator: MutationOperator | undefined; }; const mutationRegEx = - /(?[_A-Za-z]\w*?)(?:_(?PUSH|POP|ADD|SUBTRACT|MULTIPLY|DIVIDE|INCREMENT|DECREMENT))?$/; + /(?[_A-Za-z]\w*?)(?:_(?SET|PUSH|POP|ADD|SUBTRACT|MULTIPLY|DIVIDE|INCREMENT|DECREMENT))?$/; export function parseMutationField(field: string): MutationRegexGroups { const match = mutationRegEx.exec(field); diff --git a/packages/graphql/src/translate/translate-create.ts b/packages/graphql/src/translate/translate-create.ts index 131294eef5..062e12e408 100644 --- a/packages/graphql/src/translate/translate-create.ts +++ b/packages/graphql/src/translate/translate-create.ts @@ -135,7 +135,7 @@ export default async function translateCreate({ ) ); - const returnStatement = getReturnStatement(projectedVariables, context); + const returnStatement = getReturnStatement(projectedVariables); const createQuery = new Cypher.Raw((env) => { const cypher = filterTruthy([ `${createStrs.join("\n")}`, @@ -168,10 +168,7 @@ export default async function translateCreate({ return result; } -function getReturnStatement( - projectedVariables: Cypher.Variable[], - context: Neo4jGraphQLTranslationContext -): Cypher.Return { +function getReturnStatement(projectedVariables: Cypher.Variable[]): Cypher.Return { const ret = new Cypher.Return(); if (projectedVariables.length) { ret.addColumns([new Cypher.List(projectedVariables), new Cypher.NamedVariable("data")]); diff --git a/packages/graphql/src/translate/translate-delete.ts b/packages/graphql/src/translate/translate-delete.ts index 1156def285..bfaccafe65 100644 --- a/packages/graphql/src/translate/translate-delete.ts +++ b/packages/graphql/src/translate/translate-delete.ts @@ -19,7 +19,6 @@ import type Cypher from "@neo4j/cypher-builder"; import Debug from "debug"; -import type { Node } from "../classes"; import { DEBUG_TRANSLATE } from "../constants"; import type { EntityAdapter } from "../schema-model/entity/EntityAdapter"; import type { Neo4jGraphQLTranslationContext } from "../types/neo4j-graphql-translation-context"; @@ -57,11 +56,9 @@ function translateUsingQueryAST({ } export function translateDelete({ context, - node, entityAdapter, }: { context: Neo4jGraphQLTranslationContext; - node: Node; entityAdapter: EntityAdapter; }): Cypher.CypherResult { const varName = "this"; diff --git a/packages/graphql/src/translate/translate-update.ts b/packages/graphql/src/translate/translate-update.ts index a2c69a2bea..448c0952c3 100644 --- a/packages/graphql/src/translate/translate-update.ts +++ b/packages/graphql/src/translate/translate-update.ts @@ -30,7 +30,7 @@ import createCreateAndParams from "./create-create-and-params"; import createDeleteAndParams from "./create-delete-and-params"; import createDisconnectAndParams from "./create-disconnect-and-params"; import { createRelationshipValidationString } from "./create-relationship-validation-string"; -import createSetRelationshipPropertiesAndParams from "./create-set-relationship-properties-and-params"; +import { createSetRelationshipProperties } from "./create-set-relationship-properties"; import createUpdateAndParams from "./create-update-and-params"; import { QueryASTContext, QueryASTEnv } from "./queryAST/ast/QueryASTContext"; import { QueryASTFactory } from "./queryAST/factory/QueryASTFactory"; @@ -363,15 +363,20 @@ export default async function translateUpdate({ (x) => x.properties === relationField.properties ) as unknown as Relationship; - const setA = createSetRelationshipPropertiesAndParams({ + const setA = createSetRelationshipProperties({ properties: create.edge ?? {}, varName: propertiesName, + withVars, relationship, operation: "CREATE", callbackBucket, + parameterPrefix: "", + parameterNotation: ".", }); - createStrs.push(setA[0]); - cypherParams = { ...cypherParams, ...setA[1] }; + if (setA) { + createStrs.push(setA[0]); + cypherParams = { ...cypherParams, ...setA[1] }; + } } creates.push(...getAuthorizationStatements(authorizationPredicates, authorizationSubqueries)); diff --git a/packages/graphql/src/translate/utils/assert-non-ambiguous-update.ts b/packages/graphql/src/translate/utils/assert-non-ambiguous-update.ts new file mode 100644 index 0000000000..c80f14adce --- /dev/null +++ b/packages/graphql/src/translate/utils/assert-non-ambiguous-update.ts @@ -0,0 +1,33 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import type { Node, Relationship } from "../../classes"; +import { Neo4jGraphQLError } from "../../classes"; +import { findConflictingProperties } from "../../utils/find-conflicting-properties"; + +export function assertNonAmbiguousUpdate(graphElement: Relationship | Node, input: Record): void { + const conflictingProperties = findConflictingProperties({ graphElement, input }); + if (conflictingProperties.length > 0) { + throw new Neo4jGraphQLError( + `Conflicting modification of ${conflictingProperties.map((n) => `[[${n}]]`).join(", ")} on type ${ + graphElement.name + }` + ); + } +} diff --git a/packages/graphql/src/translate/utils/get-mutation-field-statements.ts b/packages/graphql/src/translate/utils/get-mutation-field-statements.ts new file mode 100644 index 0000000000..e2f2355a76 --- /dev/null +++ b/packages/graphql/src/translate/utils/get-mutation-field-statements.ts @@ -0,0 +1,102 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import type { Node, Relationship } from "../../classes"; +import { SPATIAL_TYPES } from "../../constants"; +import mapToDbProperty from "../../utils/map-to-db-property"; +import { buildMathStatements, matchMathField, mathDescriptorBuilder } from "./math"; +import { parseMutableField } from "./parse-mutable-field"; + +/** + * Transforms a key-value pair such as: + * { name_SET: "John" } + * Into statements such as: + * SET node.name = $param + **/ +export function getMutationFieldStatements({ + nodeOrRel, + param, + key, + varName, + value, + withVars, +}: { + nodeOrRel: Node | Relationship; + param: string; + key: string; + varName: string; + value: any; + withVars: string[]; +}): string { + const strs: string[] = []; + const { settableField, operator } = parseMutableField(nodeOrRel, key); + if (settableField) { + const dbFieldName = mapToDbProperty(nodeOrRel, settableField.fieldName); + if (settableField.typeMeta.required && value === null) { + throw new Error(`Cannot set non-nullable field ${nodeOrRel.name}.${settableField.fieldName} to null`); + } + + switch (operator) { + case "SET": { + const isSpatial = SPATIAL_TYPES.includes(settableField.typeMeta.name); + if (isSpatial) { + if (settableField.typeMeta.array) { + strs.push(`SET ${varName}.${dbFieldName} = [p in $${param} | point(p)]`); + } else { + strs.push(`SET ${varName}.${dbFieldName} = point($${param})`); + } + } else { + strs.push(`SET ${varName}.${dbFieldName} = $${param}`); + } + + break; + } + case "INCREMENT": + case "DECREMENT": + case "ADD": + case "SUBTRACT": + case "DIVIDE": + case "MULTIPLY": { + const mathMatch = matchMathField(key); + const mathDescriptor = mathDescriptorBuilder(value as number, nodeOrRel, mathMatch); + const mathStatements = buildMathStatements(mathDescriptor, varName, withVars, param); + strs.push(...mathStatements); + break; + } + case "PUSH": { + const pointArrayField = nodeOrRel.pointFields.find((x) => x.fieldName === settableField.fieldName); + + if (pointArrayField) { + strs.push( + `SET ${varName}.${dbFieldName} = ${varName}.${dbFieldName} + [p in $${param} | point(p)]` + ); + } else { + strs.push(`SET ${varName}.${dbFieldName} = ${varName}.${dbFieldName} + $${param}`); + } + + break; + } + case "POP": { + strs.push(`SET ${varName}.${dbFieldName} = ${varName}.${dbFieldName}[0..-$${param}]`); + break; + } + } + } + return strs.join("\n"); +} diff --git a/packages/graphql/src/translate/utils/math.ts b/packages/graphql/src/translate/utils/math.ts index dfbd3ef0ed..9667cd364e 100644 --- a/packages/graphql/src/translate/utils/math.ts +++ b/packages/graphql/src/translate/utils/math.ts @@ -17,8 +17,8 @@ * limitations under the License. */ -import mapToDbProperty from "../../utils/map-to-db-property"; import type { GraphElement } from "../../classes"; +import mapToDbProperty from "../../utils/map-to-db-property"; /** Maps Neo4jGraphQL Math operator to Cypher symbol */ const CypherOperatorMap = new Map([ @@ -37,7 +37,7 @@ function mathOperatorToSymbol(mathOperator: string): string { throw new Error(`${mathOperator} is not a valid math operator`); } -const MATH_FIELD_REGX = +const MATH_FIELD_REGEX = /(?\w*)(?_INCREMENT|_DECREMENT|_ADD|_SUBTRACT|_DIVIDE|_MULTIPLY)\b/; type MatchRegexMatchGroups = { @@ -61,7 +61,7 @@ interface MathMatch { } // Returns True in case of a valid match and the potential match. export function matchMathField(graphQLFieldName: string): MathMatch { - const mathFieldMatch = graphQLFieldName.match(MATH_FIELD_REGX); + const mathFieldMatch = graphQLFieldName.match(MATH_FIELD_REGEX); if (mathFieldMatch && mathFieldMatch.groups) { const { operatorName, propertyName } = mathFieldMatch.groups as MatchRegexMatchGroups; const hasMatched = Boolean(mathFieldMatch && mathFieldMatch.length > 2 && operatorName && propertyName); diff --git a/packages/graphql/src/translate/utils/parse-mutable-field.ts b/packages/graphql/src/translate/utils/parse-mutable-field.ts new file mode 100644 index 0000000000..6242633866 --- /dev/null +++ b/packages/graphql/src/translate/utils/parse-mutable-field.ts @@ -0,0 +1,37 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import type { Node, Relationship } from "../../classes"; +import type { MutableField } from "../../classes/Node"; +import type { MutationOperator } from "../queryAST/factory/parsers/parse-mutation-field"; +import { parseMutationField } from "../queryAST/factory/parsers/parse-mutation-field"; + +export function parseMutableField( + nodeOrRel: Node | Relationship, + key: string +): { settableField: MutableField; operator: MutationOperator } { + const { fieldName, operator } = parseMutationField(key); + const field = nodeOrRel.mutableFields.find((x) => x.fieldName === fieldName); + + if (field) { + return { settableField: field, operator: operator ?? "SET" }; + } + + throw new Error(`Transpile error: field ${key} not found`); +} diff --git a/packages/graphql/src/types/index.ts b/packages/graphql/src/types/index.ts index 9f69d80c73..01b7382c56 100644 --- a/packages/graphql/src/types/index.ts +++ b/packages/graphql/src/types/index.ts @@ -448,6 +448,7 @@ export type Neo4jFeaturesSettings = { **/ excludeDeprecatedFields?: { implicitEqualFilters?: boolean; + implicitSet?: boolean; deprecatedOptionsArgument?: boolean; }; vector?: Neo4jVectorSettings; diff --git a/packages/graphql/src/utils/find-conflicting-properties.ts b/packages/graphql/src/utils/find-conflicting-properties.ts index eee6c3b5e9..f96f34f5e2 100644 --- a/packages/graphql/src/utils/find-conflicting-properties.ts +++ b/packages/graphql/src/utils/find-conflicting-properties.ts @@ -17,16 +17,16 @@ * limitations under the License. */ -import type { Node } from "../classes"; +import type { GraphElement } from "../classes"; import { parseMutationField } from "../translate/queryAST/factory/parsers/parse-mutation-field"; import mapToDbProperty from "./map-to-db-property"; /* returns conflicting mutation input properties */ export function findConflictingProperties({ - node, + graphElement, input, }: { - node: Node; + graphElement: GraphElement; input: Record | undefined; }): string[] { if (!input) { @@ -35,7 +35,7 @@ export function findConflictingProperties({ const dbPropertiesToInputFieldNames: Record = Object.keys(input).reduce((acc, rawField) => { const { fieldName } = parseMutationField(rawField); - const dbName = mapToDbProperty(node, fieldName); + const dbName = mapToDbProperty(graphElement, fieldName); // some input fields (eg relation fields) have no corresponding db name in the map if (!dbName) { return acc; diff --git a/packages/graphql/tests/integration/aggregations/where/mutations/update/top-level-where.int.test.ts b/packages/graphql/tests/integration/aggregations/where/mutations/update/top-level-where.int.test.ts index 2ce0ccbe56..7422e3b034 100644 --- a/packages/graphql/tests/integration/aggregations/where/mutations/update/top-level-where.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/where/mutations/update/top-level-where.int.test.ts @@ -77,7 +77,7 @@ describe("Delete using top level aggregate where", () => { }); test("Implicit AND", async () => { - const query = ` + const query = /* GraphQL */ ` mutation { ${postType.operations.update}( where: { @@ -88,7 +88,7 @@ describe("Delete using top level aggregate where", () => { } } } - update: { content: "${updatedContent}" } + update: { content_SET: "${updatedContent}" } ) { ${postType.plural} { id diff --git a/packages/graphql/tests/integration/aggregations/where/mutations/update/update-arg.int.test.ts b/packages/graphql/tests/integration/aggregations/where/mutations/update/update-arg.int.test.ts index 00ae873811..a01d1679aa 100644 --- a/packages/graphql/tests/integration/aggregations/where/mutations/update/update-arg.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/where/mutations/update/update-arg.int.test.ts @@ -79,7 +79,7 @@ describe("Update using aggregate where", () => { }); test("should update by using an aggregation count", async () => { - const query = ` + const query = /* GraphQL */ ` mutation { ${userType.operations.update}( where: { name_EQ: "${userName}" } @@ -94,7 +94,7 @@ describe("Update using aggregate where", () => { } update: { node: { - content: "${expectedContent}" + content_SET: "${expectedContent}" } } } @@ -150,7 +150,7 @@ describe("Update using aggregate where", () => { }); test("should update by using a nested aggregation", async () => { - const query = ` + const query = /* GraphQL */ ` mutation { ${userType.operations.update}( where: { name_EQ: "${userName}" } @@ -175,7 +175,7 @@ describe("Update using aggregate where", () => { } update: { node: { - content: "${expectedContent}" + content_SET: "${expectedContent}" } } } diff --git a/packages/graphql/tests/integration/array-methods/array-pop-errors.int.test.ts b/packages/graphql/tests/integration/array-methods/array-pop-errors.int.test.ts index 3dd50e6714..074f8d7459 100644 --- a/packages/graphql/tests/integration/array-methods/array-pop-errors.int.test.ts +++ b/packages/graphql/tests/integration/array-methods/array-pop-errors.int.test.ts @@ -234,9 +234,9 @@ describe("array-pop-errors", () => { charset: "alphabetic", }); - const update = ` + const update = /* GraphQL */ ` mutation { - ${typeMovie.operations.update} (update: { tags_POP: 1, tags: [] }) { + ${typeMovie.operations.update} (update: { tags_POP: 1, tags_SET: [] }) { ${typeMovie.plural} { title tags @@ -254,8 +254,9 @@ describe("array-pop-errors", () => { const gqlResult = await testHelper.executeGraphQL(update); expect(gqlResult.errors).toEqual([ - new GraphQLError(`Conflicting modification of [[tags]], [[tags_POP]] on type ${typeMovie}`), + new GraphQLError(`Conflicting modification of [[tags_SET]], [[tags_POP]] on type ${typeMovie}`), ]); + expect(gqlResult.data).toBeNull(); }); @@ -286,14 +287,14 @@ describe("array-pop-errors", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation Mutation($id: ID, $numberToPop: Int) { ${actor.operations.update}(where: { id_EQ: $id }, update: { actedIn: [ { update: { edge: { - pay: [], + pay_SET: [], pay_POP: $numberToPop } } @@ -333,11 +334,11 @@ describe("array-pop-errors", () => { }); expect(gqlResult.errors).toBeDefined(); - expect( - (gqlResult.errors as GraphQLError[]).some((el) => - el.message.includes("Cannot mutate the same field multiple times in one Mutation") - ) - ).toBeTruthy(); + + const relationshipType = `${movie.name}ActorsRelationship`; + expect(gqlResult.errors).toEqual([ + new GraphQLError(`Conflicting modification of [[pay_SET]], [[pay_POP]] on type ${relationshipType}`), + ]); expect(gqlResult.data).toBeNull(); }); }); diff --git a/packages/graphql/tests/integration/array-methods/array-pop.int.test.ts b/packages/graphql/tests/integration/array-methods/array-pop.int.test.ts index 54b7971fae..84f8290801 100644 --- a/packages/graphql/tests/integration/array-methods/array-pop.int.test.ts +++ b/packages/graphql/tests/integration/array-methods/array-pop.int.test.ts @@ -760,7 +760,7 @@ describe("array-pop", () => { test("should be possible to update Point relationship properties", async () => { const movie = testHelper.createUniqueType("Movie"); const actor = testHelper.createUniqueType("Actor"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${movie.name} @node { title: String actors: [${actor.name}!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) diff --git a/packages/graphql/tests/integration/array-methods/array-push-errors.int.test.ts b/packages/graphql/tests/integration/array-methods/array-push-errors.int.test.ts index 03af43247d..f0fe245177 100644 --- a/packages/graphql/tests/integration/array-methods/array-push-errors.int.test.ts +++ b/packages/graphql/tests/integration/array-methods/array-push-errors.int.test.ts @@ -18,7 +18,6 @@ */ import { GraphQLError } from "graphql"; -import { gql } from "graphql-tag"; import { IncomingMessage } from "http"; import { Socket } from "net"; import { generate } from "randomstring"; @@ -36,7 +35,7 @@ describe("array-push", () => { test("should throw an error when trying to push on to a non-existing array", async () => { const typeMovie = testHelper.createUniqueType("Movie"); - const typeDefs = gql` + const typeDefs = /* GraphQL */ ` type ${typeMovie} @node { title: String tags: [String] @@ -49,7 +48,7 @@ describe("array-push", () => { charset: "alphabetic", }); - const update = ` + const update = /* GraphQL */ ` mutation { ${typeMovie.operations.update} (update: { tags_PUSH: "test" }) { ${typeMovie.plural} { @@ -91,7 +90,7 @@ describe("array-push", () => { features: { authorization: { key: "secret" } }, }); - const update = ` + const update = /* GraphQL */ ` mutation { ${typeMovie.operations.update} (update: { tags_PUSH: "test" }) { ${typeMovie.plural} { @@ -130,7 +129,7 @@ describe("array-push", () => { test("should throw an error when input is invalid", async () => { const typeMovie = testHelper.createUniqueType("Movie"); - const typeDefs = gql` + const typeDefs = /* GraphQL */ ` type ${typeMovie} @node { title: String tags: [String] @@ -143,7 +142,7 @@ describe("array-push", () => { charset: "alphabetic", }); - const update = ` + const update = /* GraphQL */ ` mutation { ${typeMovie.operations.update} (update: { tags_PUSH: 123 }) { ${typeMovie.plural} { @@ -174,7 +173,7 @@ describe("array-push", () => { test("should throw an error when performing an ambiguous property update", async () => { const typeMovie = testHelper.createUniqueType("Movie"); - const typeDefs = gql` + const typeDefs = /* GraphQL */ ` type ${typeMovie} @node { title: String tags: [String] @@ -187,9 +186,9 @@ describe("array-push", () => { charset: "alphabetic", }); - const update = ` + const update = /* GraphQL */ ` mutation { - ${typeMovie.operations.update} (update: { tags_PUSH: "test", tags: [] }) { + ${typeMovie.operations.update} (update: { tags_PUSH: "test", tags_SET: [] }) { ${typeMovie.plural} { title tags @@ -207,7 +206,7 @@ describe("array-push", () => { const gqlResult = await testHelper.executeGraphQL(update); expect(gqlResult.errors).toEqual([ - new GraphQLError(`Conflicting modification of [[tags]], [[tags_PUSH]] on type ${typeMovie}`), + new GraphQLError(`Conflicting modification of [[tags_SET]], [[tags_PUSH]] on type ${typeMovie}`), ]); expect(gqlResult.data).toBeNull(); }); @@ -217,7 +216,7 @@ describe("array-push", () => { const payIncrement = 50; const movie = testHelper.createUniqueType("Movie"); const actor = testHelper.createUniqueType("Actor"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${movie.name} @node { title: String actors: [${actor.name}!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) @@ -240,14 +239,14 @@ describe("array-push", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation Mutation($id: ID, $payIncrement: [Float]) { ${actor.operations.update}(where: { id_EQ: $id }, update: { actedIn: [ { update: { edge: { - pay: [], + pay_SET: [], pay_PUSH: $payIncrement } } @@ -287,11 +286,11 @@ describe("array-push", () => { }); expect(gqlResult.errors).toBeDefined(); - expect( - (gqlResult.errors as GraphQLError[]).some((el) => - el.message.includes("Cannot mutate the same field multiple times in one Mutation") - ) - ).toBeTruthy(); + const relationshipType = `${movie.name}ActorsRelationship`; + expect(gqlResult.errors).toEqual([ + new GraphQLError(`Conflicting modification of [[pay_SET]], [[pay_PUSH]] on type ${relationshipType}`), + ]); + expect(gqlResult.data).toBeNull(); }); }); diff --git a/packages/graphql/tests/integration/composite-where.int.test.ts b/packages/graphql/tests/integration/composite-where.int.test.ts index ee7a095b7c..7a5b4901b8 100644 --- a/packages/graphql/tests/integration/composite-where.int.test.ts +++ b/packages/graphql/tests/integration/composite-where.int.test.ts @@ -70,7 +70,7 @@ describe("composite-where", () => { where: { id_EQ: $movieId } - update:{ + update: { actors: { delete: { where: { diff --git a/packages/graphql/tests/integration/deprecations/update-no-implicit-set.int.test.ts b/packages/graphql/tests/integration/deprecations/update-no-implicit-set.int.test.ts new file mode 100644 index 0000000000..8c9da8dbeb --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/update-no-implicit-set.int.test.ts @@ -0,0 +1,1392 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { generate } from "randomstring"; +import type { UniqueType } from "../../utils/graphql-types"; +import { TestHelper } from "../../utils/tests-helper"; + +describe("update (deprecate implicit _SET)", () => { + const testHelper = new TestHelper(); + let Movie: UniqueType; + let Actor: UniqueType; + let Person: UniqueType; + let Product: UniqueType; + let Photo: UniqueType; + let Color: UniqueType; + let Series: UniqueType; + + beforeEach(() => { + Movie = testHelper.createUniqueType("Movie"); + Actor = testHelper.createUniqueType("Actor"); + Person = testHelper.createUniqueType("Person"); + Product = testHelper.createUniqueType("Product"); + Photo = testHelper.createUniqueType("Photo"); + Color = testHelper.createUniqueType("Color"); + Series = testHelper.createUniqueType("Series"); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + test("should update no movies where predicate yields false", async () => { + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + id: ID! + name: String + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const id = generate({ + charset: "alphabetic", + }); + + const updatedName = generate({ + charset: "alphabetic", + }); + + const query = /* GraphQL */ ` + mutation($id: ID, $name: String) { + ${Movie.operations.update}(where: { id_EQ: $id }, update: {name: $name}) { + ${Movie.plural} { + id + name + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query, { + variableValues: { id, name: updatedName }, + }); + + expect(gqlResult.errors).toBeFalsy(); + + expect(gqlResult?.data?.[Movie.operations.update]).toEqual({ [Movie.plural]: [] }); + }); + + test("should update a single movie", async () => { + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + id: ID! + name: String + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const id = generate({ + charset: "alphabetic", + }); + + const initialName = generate({ + charset: "alphabetic", + }); + + const updatedName = generate({ + charset: "alphabetic", + }); + + const query = /* GraphQL */ ` + mutation($id: ID, $name: String) { + ${Movie.operations.update}(where: { id_EQ: $id }, update: {name: $name}) { + ${Movie.plural} { + id + name + } + } + } + `; + + await testHelper.executeCypher( + ` + CREATE (:${Movie} {id: $id, name: $initialName}) + `, + { + id, + initialName, + } + ); + + const gqlResult = await testHelper.executeGraphQL(query, { + variableValues: { id, name: updatedName }, + }); + + expect(gqlResult.errors).toBeFalsy(); + + expect(gqlResult?.data?.[Movie.operations.update]).toEqual({ [Movie.plural]: [{ id, name: updatedName }] }); + }); + test("should connect through interface relationship", async () => { + const typeDefs = /* GraphQL */ ` + type ${Movie} implements Production @subscription(events: []) @node { + title: String! + id: ID + director: [Creature!]! @relationship(type: "DIRECTED", direction: IN) + } + + type ${Series} implements Production @node { + title: String! + episode: Int! + id: ID + director: [Creature!]! @relationship(type: "DIRECTED", direction: IN) + } + + interface Production { + id: ID + director: [Creature!]! @declareRelationship + } + + type ${Person} implements Creature @node { + id: ID + movies: Production! @relationship(type: "DIRECTED", direction: OUT) + } + + interface Creature { + id: ID + movies: Production! @declareRelationship + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + }); + const query = /* GraphQL */ ` + mutation { + ${Movie.operations.update}( + where: { id_EQ: "1" }, + update: { director: { + connect: { + where: { node: { id_EQ: "2"} }, + connect: { movies: { + where: { node: { id_EQ: "3"} }, + connect: { director: { + where: { node: { id_EQ: "4"} }, + connect: { movies: { + where: { node: { id_EQ: "5" } } + } } + } } + } + } } + } }) { + ${Movie.plural} { + id + title + } + } + } + `; + + await testHelper.executeCypher( + ` + CREATE (:${Movie} {id: "1", title: "Movie1"}) + CREATE (:${Movie} {id: "3", title: "Movie3"}) + CREATE (:${Movie} {id: "5", title: "Movie5"}) + CREATE (p1:${Person} {id: "2"}) + CREATE (p2:${Person} {id: "4"}) + CREATE (s:${Series} {id: "10", title: "Series1", episode: 20}) + MERGE (p1)-[:DIRECTED]->(s) + MERGE (p2)-[:DIRECTED]->(s) + ` + ); + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + + const cypherResult = await testHelper.executeCypher( + ` + MATCH (p:${Person} {id: "4"})-[:DIRECTED]->(m:${Movie} {id: "5"}) RETURN p, m + ` + ); + + expect(cypherResult.records).toHaveLength(1); + + expect(gqlResult?.data?.[Movie.operations.update]).toEqual({ + [Movie.plural]: [{ id: "1", title: "Movie1" }], + }); + }); + + test("should update a movie when matching on relationship property", async () => { + const typeDefs = /* GraphQL */ ` + type ${Actor} @node { + name: String + movies: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) + } + + type ${Movie} @node { + id: ID + actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const initialMovieId = generate({ + charset: "alphabetic", + }); + + const updatedMovieId = generate({ + charset: "alphabetic", + }); + + const actorName = generate({ + charset: "alphabetic", + }); + + const query = /* GraphQL */ ` + mutation($updatedMovieId: ID, $actorName: String) { + ${Movie.operations.update}( + where: { actorsConnection_SOME: { node: { name_EQ: $actorName } } }, + update: { + id: $updatedMovieId + } + ) { + ${Movie.plural} { + id + actors { + name + } + } + } + } + `; + + await testHelper.executeCypher( + ` + CREATE (m:${Movie} {id: $initialMovieId})<-[:ACTED_IN]-(a:${Actor} {name: $actorName}) + `, + { + initialMovieId, + actorName, + } + ); + + const gqlResult = await testHelper.executeGraphQL(query, { + variableValues: { updatedMovieId, actorName }, + }); + + expect(gqlResult.errors).toBeFalsy(); + + expect(gqlResult?.data?.[Movie.operations.update]).toEqual({ + [Movie.plural]: [{ id: updatedMovieId, actors: [{ name: actorName }] }], + }); + }); + + test("should update 2 movies", async () => { + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + id: ID! + name: String + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const id1 = generate({ + charset: "alphabetic", + }); + + const id2 = generate({ + charset: "alphabetic", + }); + + const updatedName = "Beer"; + + const query = /* GraphQL */ ` + mutation($id1: ID, $id2: ID, $name: String) { + ${Movie.operations.update}(where: { OR: [{ id_EQ: $id1 }, { id_EQ: $id2 }] }, update: {name: $name}) { + ${Movie.plural} { + id + name + } + } + } + `; + + await testHelper.executeCypher( + ` + CREATE (:${Movie} {id: $id1}) + CREATE (:${Movie} {id: $id2}) + `, + { + id1, + id2, + } + ); + + const gqlResult = await testHelper.executeGraphQL(query, { + variableValues: { id1, id2, name: updatedName }, + }); + + expect(gqlResult.errors).toBeFalsy(); + + expect(gqlResult?.data?.[Movie.operations.update]?.[Movie.plural] as any[]).toHaveLength(2); + + (gqlResult?.data?.[Movie.operations.update]?.[Movie.plural] as any[]).forEach((movie) => { + expect([id1, id2]).toContain(movie.id); + expect(movie.name).toEqual(updatedName); + }); + }); + + test("should update nested actors from a movie", async () => { + const typeDefs = /* GraphQL */ ` + type ${Actor} @node { + name: String + movies: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) + } + + type ${Movie} @node { + id: ID + actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const movieId = generate({ + charset: "alphabetic", + }); + + const initialName = generate({ + charset: "alphabetic", + }); + + const updatedName = generate({ + charset: "alphabetic", + }); + + const query = /* GraphQL */ ` + mutation($movieId: ID, $initialName: String, $updatedName: String) { + ${Movie.operations.update}( + where: { id_EQ: $movieId }, + update: { + actors: [{ + where: { node: { name_EQ: $initialName } }, + update: { node: { name: $updatedName } } + }] + } + ) { + ${Movie.plural} { + id + actors { + name + } + } + } + } + `; + + await testHelper.executeCypher( + ` + CREATE (m:${Movie} {id: $movieId}) + CREATE (a:${Actor} {name: $initialName}) + MERGE (a)-[:ACTED_IN]->(m) + `, + { + movieId, + initialName, + } + ); + + const gqlResult = await testHelper.executeGraphQL(query, { + variableValues: { movieId, updatedName, initialName }, + }); + + expect(gqlResult.errors).toBeFalsy(); + + expect(gqlResult?.data?.[Movie.operations.update]).toEqual({ + [Movie.plural]: [{ id: movieId, actors: [{ name: updatedName }] }], + }); + }); + + test("should delete a nested actor from a movie abc", async () => { + const typeDefs = /* GraphQL */ ` + type ${Actor} @node { + name: String + movies: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) + } + + type ${Movie} @node { + id: ID + actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const id = generate({ + charset: "alphabetic", + }); + + const actorName1 = generate({ + charset: "alphabetic", + }); + const actorName2 = generate({ + charset: "alphabetic", + }); + + const mutation = ` + mutation($id: ID, $actorName1: String) { + ${Movie.operations.update}(where: { id_EQ: $id }, update: { actors: { delete: { where: { node: { name_EQ: $actorName1 } } } } }) { + ${Movie.plural} { + id + actors { + name + } + } + } + } + `; + + await testHelper.executeCypher( + ` + CREATE (m:${Movie} {id: $id}) + CREATE (a1:${Actor} {name: $actorName1}) + CREATE (a2:${Actor} {name: $actorName2}) + MERGE (a1)-[:ACTED_IN]->(m) + MERGE (a2)-[:ACTED_IN]->(m) + `, + { + id, + actorName1, + actorName2, + } + ); + + const gqlResult = await testHelper.executeGraphQL(mutation, { + variableValues: { id, actorName1 }, + }); + + expect(gqlResult.errors).toBeFalsy(); + + expect(gqlResult?.data?.[Movie.operations.update]).toEqual({ + [Movie.plural]: [{ id, actors: [{ name: actorName2 }] }], + }); + }); + + test("should delete a nested actor from a movie within an update block", async () => { + const typeDefs = /* GraphQL */ ` + type ${Actor} @node { + name: String + movies: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) + } + + type ${Movie} @node { + id: ID + actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const id = generate({ + charset: "alphabetic", + }); + + const actorName1 = generate({ + charset: "alphabetic", + }); + const actorName2 = generate({ + charset: "alphabetic", + }); + + const mutation = ` + mutation($id: ID, $actorName1: String) { + ${Movie.operations.update}(where: { id_EQ: $id }, update: { actors: { delete: { where: { node: { name_EQ: $actorName1 } } } } }) { + ${Movie.plural} { + id + actors { + name + } + } + } + } + `; + + await testHelper.executeCypher( + ` + CREATE (m:${Movie} {id: $id}) + CREATE (a1:${Actor} {name: $actorName1}) + CREATE (a2:${Actor} {name: $actorName2}) + MERGE (a1)-[:ACTED_IN]->(m) + MERGE (a2)-[:ACTED_IN]->(m) + `, + { + id, + actorName1, + actorName2, + } + ); + + const gqlResult = await testHelper.executeGraphQL(mutation, { + variableValues: { id, actorName1 }, + }); + + expect(gqlResult.errors).toBeFalsy(); + + expect(gqlResult?.data?.[Movie.operations.update]).toEqual({ + [Movie.plural]: [{ id, actors: [{ name: actorName2 }] }], + }); + }); + + test("should delete a nested actor and one of their nested movies, within an update block abc", async () => { + const typeDefs = /* GraphQL */ ` + type ${Actor} @node { + name: String + movies: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) + } + + type ${Movie} @node { + id: ID + actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const movieId1 = generate({ + charset: "alphabetic", + }); + + const movieId2 = generate({ + charset: "alphabetic", + }); + + const actorName1 = generate({ + charset: "alphabetic", + }); + + const actorName2 = generate({ + charset: "alphabetic", + }); + + const mutation = ` + mutation($movieId1: ID, $actorName1: String, $movieId2: ID) { + ${Movie.operations.update}( + where: { id_EQ: $movieId1 } + update: { + actors: { delete: { where: { node: { name_EQ: $actorName1 } }, delete: { movies: { where: { node: { id_EQ: $movieId2 } } } } } } + } + ) { + ${Movie.plural} { + id + actors { + name + } + } + } + } + `; + + await testHelper.executeCypher( + ` + CREATE (m1:${Movie} {id: $movieId1}) + CREATE (m2:${Movie} {id: $movieId2}) + + CREATE (a1:${Actor} {name: $actorName1}) + CREATE (a2:${Actor} {name: $actorName2}) + + MERGE (a1)-[:ACTED_IN]->(m1) + MERGE (a1)-[:ACTED_IN]->(m2) + + MERGE (a2)-[:ACTED_IN]->(m1) + MERGE (a2)-[:ACTED_IN]->(m2) + `, + { + movieId1, + actorName1, + actorName2, + movieId2, + } + ); + + const gqlResult = await testHelper.executeGraphQL(mutation, { + variableValues: { movieId1, actorName1, movieId2 }, + }); + + expect(gqlResult.errors).toBeFalsy(); + + expect(gqlResult?.data?.[Movie.operations.update]).toEqual({ + [Movie.plural]: [{ id: movieId1, actors: [{ name: actorName2 }] }], + }); + + const movie2 = await testHelper.executeCypher( + ` + MATCH (m:${Movie} {id: $id}) + RETURN m + `, + { id: movieId2 } + ); + + expect(movie2.records).toHaveLength(0); + }); + + test("should delete multiple nested actors from a movie", async () => { + const typeDefs = /* GraphQL */ ` + type ${Actor} @node { + name: String + movies: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) + } + + type ${Movie} @node { + id: ID + actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const id = generate({ + charset: "alphabetic", + }); + + const name1 = generate({ + charset: "alphabetic", + }); + + const name2 = generate({ + charset: "alphabetic", + }); + + const name3 = generate({ + charset: "alphabetic", + }); + + const mutation = ` + mutation($id: ID, $name1: String, $name3: String) { + ${Movie.operations.update}( + where: { id_EQ: $id } + update: { actors: { delete: [{ where: { node: { name_EQ: $name1 } } }, { where: { node: { name_EQ: $name3 } } }]}} + ) { + ${Movie.plural} { + id + actors { + name + } + } + } + } + `; + + await testHelper.executeCypher( + ` + CREATE (m:${Movie} {id: $id}) + CREATE (a1:${Actor} {name: $name1}) + CREATE (a2:${Actor} {name: $name2}) + CREATE (a3:${Actor} {name: $name3}) + MERGE (a1)-[:ACTED_IN]->(m) + MERGE (a2)-[:ACTED_IN]->(m) + MERGE (a3)-[:ACTED_IN]->(m) + `, + { + id, + name1, + name2, + name3, + } + ); + + const gqlResult = await testHelper.executeGraphQL(mutation, { + variableValues: { id, name1, name3 }, + }); + + expect(gqlResult.errors).toBeFalsy(); + + expect(gqlResult?.data?.[Movie.operations.update]).toEqual({ + [Movie.plural]: [{ id, actors: [{ name: name2 }] }], + }); + }); + + test("should update nested actors from a move then update the movie from the nested actors", async () => { + const typeDefs = /* GraphQL */ ` + type ${Actor} @node { + name: String + movies: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) + } + + type ${Movie} @node { + id: ID + title: String + actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const movieId = generate({ + charset: "alphabetic", + }); + + const query = /* GraphQL */ ` + mutation { + ${Movie.operations.update}( + where: { id_EQ: "${movieId}" } + update: { + actors: [{ + where: { node: { name_EQ: "old actor name" } } + update: { + node: { + name: "new actor name" + movies: [{ + where: { node: { title_EQ: "old movie title" } } + update: { node: { title: "new movie title" } } + }] + } + } + }] + } + ) { + ${Movie.plural} { + id + title + actors { + name + } + } + } + } + `; + + await testHelper.executeCypher( + ` + CREATE (:${Movie} {id: $movieId, title: "old movie title"})<-[:ACTED_IN]-(:${Actor} {name: "old actor name"}) + `, + { + movieId, + } + ); + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + + expect(gqlResult?.data?.[Movie.operations.update]).toEqual({ + [Movie.plural]: [{ id: movieId, title: "new movie title", actors: [{ name: "new actor name" }] }], + }); + }); + + test("should connect a single movie to a actor", async () => { + const typeDefs = /* GraphQL */ ` + type ${Actor} @node { + id: ID + movies: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) + } + + type ${Movie} @node { + id: ID + actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const movieId = generate({ + charset: "alphabetic", + }); + + const actorId = generate({ + charset: "alphabetic", + }); + + const query = /* GraphQL */ ` + mutation { + ${Movie.operations.update}(where: { id_EQ: "${movieId}" }, update: {actors: { connect: [{ where: { node:{ id_EQ: "${actorId}"}}}]}}) { + ${Movie.plural} { + id + actors { + id + } + } + } + } + `; + + await testHelper.executeCypher( + ` + CREATE (:${Movie} {id: $movieId}) + CREATE (:${Actor} {id: $actorId}) + `, + { + movieId, + actorId, + } + ); + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + + expect(gqlResult?.data?.[Movie.operations.update]).toEqual({ + [Movie.plural]: [{ id: movieId, actors: [{ id: actorId }] }], + }); + }); + + test("should connect a single movie to a actor based on a connection predicate", async () => { + const typeDefs = /* GraphQL */ ` + type ${Actor} @node { + id: ID + movies: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) + series: [${Series}!]! @relationship(type: "ACTED_IN", direction: OUT) + } + + type ${Movie} @node { + id: ID + actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN) + } + + type ${Series} @node { + id: ID + actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const movieId = generate({ + charset: "alphabetic", + }); + + const actorId = generate({ + charset: "alphabetic", + }); + + const seriesId = generate({ + charset: "alphabetic", + }); + + const query = /* GraphQL */ ` + mutation($movieId: ID, $seriesId: ID) { + ${Movie.operations.update}( + where: { id_EQ: $movieId } + update: { actors: { connect: [{ where: { node: { seriesConnection_SOME: { node: { id_EQ: $seriesId } } } } }]} } + ) { + ${Movie.plural} { + id + actors { + id + } + } + } + } + `; + + await testHelper.executeCypher( + ` + CREATE (:${Movie} {id: $movieId}) + CREATE (:${Actor} {id: $actorId})-[:ACTED_IN]->(:${Series} {id: $seriesId}) + `, + { + movieId, + actorId, + seriesId, + } + ); + + const gqlResult = await testHelper.executeGraphQL(query, { + variableValues: { movieId, seriesId }, + }); + + expect(gqlResult.errors).toBeFalsy(); + + expect(gqlResult?.data?.[Movie.operations.update]).toEqual({ + [Movie.plural]: [{ id: movieId, actors: [{ id: actorId }] }], + }); + }); + + test("should disconnect an actor from a movie", async () => { + const typeDefs = /* GraphQL */ ` + type ${Actor} @node { + id: ID + movies: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) + } + + type ${Movie} @node { + id: ID + actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const movieId = generate({ + charset: "alphabetic", + }); + + const actorId1 = generate({ + charset: "alphabetic", + }); + const actorId2 = generate({ + charset: "alphabetic", + }); + + const query = /* GraphQL */ ` + mutation { + ${Movie.operations.update}(where: { id_EQ: "${movieId}" }, update: {actors: { disconnect: [{where: { node: { id_EQ: "${actorId1}"}}}]}}) { + ${Movie.plural} { + id + actors { + id + } + } + } + } + `; + + await testHelper.executeCypher( + ` + CREATE (m:${Movie} {id: $movieId}) + CREATE (a1:${Actor} {id: $actorId1}) + CREATE (a2:${Actor} {id: $actorId2}) + MERGE (m)<-[:ACTED_IN]-(a1) + MERGE (m)<-[:ACTED_IN]-(a2) + `, + { + movieId, + actorId1, + actorId2, + } + ); + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + + expect(gqlResult?.data?.[Movie.operations.update]).toEqual({ + [Movie.plural]: [{ id: movieId, actors: [{ id: actorId2 }] }], + }); + }); + + test("should disconnect a color from a photo through a product", async () => { + const typeDefs = /* GraphQL */ ` + type ${Product} @node { + id: ID + photos: [${Photo}!]! @relationship(type: "HAS_PHOTO", direction: OUT) + } + + type ${Color} @node { + id: ID + } + + type ${Photo} @node { + id: ID + color: ${Color} @relationship(type: "OF_COLOR", direction: OUT) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const productId = generate({ + charset: "alphabetic", + }); + + const photoId = generate({ + charset: "alphabetic", + }); + + const colorId = generate({ + charset: "alphabetic", + }); + + const query = /* GraphQL */ ` + mutation { + ${Product.operations.update}( + where: { id_EQ: "${productId}" } + update: { + photos: [{ + where: { node: { id_EQ: "${photoId}" } } + update: { + node: { + color: { disconnect: { where: { node: { id_EQ: "${colorId}" } } } } + } + } + }] + } + ){ + ${Product.plural} { + id + photos { + id + color { + id + } + } + } + } + } + `; + + await testHelper.executeCypher( + ` + CREATE (p:${Product} {id: $productId}) + CREATE (photo:${Photo} {id: $photoId}) + CREATE (color:${Color} {id: $colorId}) + MERGE (p)-[:HAS_PHOTO]->(photo)-[:OF_COLOR]->(color) + + `, + { + productId, + photoId, + colorId, + } + ); + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + + expect(gqlResult?.data?.[Product.operations.update]).toEqual({ + [Product.plural]: [{ id: productId, photos: [{ id: photoId, color: null }] }], + }); + }); + + test("should update the colors of a product to light versions", async () => { + const typeDefs = /* GraphQL */ ` + type ${Product} @node { + id: ID + name: String + photos: [${Photo}!]! @relationship(type: "HAS_PHOTO", direction: OUT) + } + + + type ${Color} @node { + name: String + id: ID + } + + type ${Photo} @node { + id: ID + name: String + color: ${Color}! @relationship(type: "OF_COLOR", direction: OUT) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const productId = generate({ + charset: "alphabetic", + }); + + const photo0Id = generate({ + charset: "alphabetic", + }); + + const photo0Color0Id = generate({ + charset: "alphabetic", + }); + + const photo0Color1Id = generate({ + charset: "alphabetic", + }); + + const photo1Id = generate({ + charset: "alphabetic", + }); + + const photo1Color0Id = generate({ + charset: "alphabetic", + }); + + const photo1Color1Id = generate({ + charset: "alphabetic", + }); + + const query = /* GraphQL */ ` + mutation { + ${Product.operations.update}( + where: { id_EQ: "${productId}" } + update: { + photos: [ + { + where: { node: { name_EQ: "Green Photo", id_EQ: "${photo0Id}" } } + update: { + node: { + name: "Light Green Photo" + color: { + connect: { where: { node: { name_EQ: "Light Green", id_EQ: "${photo0Color1Id}" } } } + disconnect: { where: { node: { name_EQ: "Green", id_EQ: "${photo0Color0Id}" } } } + } + } + } + } + { + where: { node: { name_EQ: "Yellow Photo", id_EQ: "${photo1Id}" } } + update: { + node: { + name: "Light Yellow Photo" + color: { + connect: { where: { node: { name_EQ: "Light Yellow", id_EQ: "${photo1Color1Id}" } } } + disconnect: { where: { node: { name_EQ: "Yellow", id_EQ: "${photo1Color0Id}" } } } + } + } + } + } + ] + } + ) { + ${Product.plural} { + id + photos { + id + name + color { + id + name + } + } + } + } + } + `; + + await testHelper.executeCypher( + ` + CREATE (product:${Product} {name: "Pringles", id: $productId}) + CREATE (photo0:${Photo} {id: $photo0Id, name: "Green Photo"}) + CREATE (photo0_color0:${Color} {id: $photo0_color0Id, name: "Green"}) + CREATE (photo0_color1:${Color} {id: $photo0_color1Id, name: "Light Green"}) + CREATE (photo1:${Photo} {id: $photo1Id, name: "Yellow Photo"}) + CREATE (photo1_color0:${Color} {id: $photo1_color0Id, name: "Yellow"}) + CREATE (photo1_color1:${Color} {id: $photo1_color1Id, name: "Light Yellow"}) + MERGE (product)-[:HAS_PHOTO]->(photo0) + MERGE (photo0)-[:OF_COLOR]->(photo0_color0) + MERGE (product)-[:HAS_PHOTO]->(photo1) + MERGE (photo1)-[:OF_COLOR]->(photo1_color0) + + + `, + { + productId, + photo0Id, + photo0_color0Id: photo0Color0Id, + photo0_color1Id: photo0Color1Id, + photo1Id, + photo1_color0Id: photo1Color0Id, + photo1_color1Id: photo1Color1Id, + } + ); + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + + expect(gqlResult?.data?.[Product.operations.update]?.[Product.plural] as any[]).toHaveLength(1); + + const { photos } = (gqlResult?.data?.[Product.operations.update]?.[Product.plural] as any[])[0]; + + const greenPhoto = photos.find((x) => x.id === photo0Id); + + expect(greenPhoto).toMatchObject({ + id: photo0Id, + name: "Light Green Photo", + color: { id: photo0Color1Id, name: "Light Green" }, + }); + + const yellowPhoto = photos.find((x) => x.id === photo1Id); + + expect(yellowPhoto).toMatchObject({ + id: photo1Id, + name: "Light Yellow Photo", + color: { id: photo1Color1Id, name: "Light Yellow" }, + }); + }); + + test("should update a Product via creating a new Photo and creating a new Color (via field level update)", async () => { + const typeDefs = /* GraphQL */ ` + type ${Product} @node { + id: ID + name: String + photos: [${Photo}!]! @relationship(type: "HAS_PHOTO", direction: OUT) + } + + + type ${Color} @node { + name: String + id: ID + } + + type ${Photo} @node { + id: ID + name: String + color: ${Color}! @relationship(type: "OF_COLOR", direction: OUT) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const productId = generate({ + charset: "alphabetic", + }); + + const photoId = generate({ + charset: "alphabetic", + }); + + const colorId = generate({ + charset: "alphabetic", + }); + + const query = /* GraphQL */ ` + mutation { + ${Product.operations.update}( + where: { id_EQ: "${productId}" } + update: { + photos: [{ + create: [{ + node: { + id: "${photoId}", + name: "Green Photo", + color: { + create: { + node: { + id: "${colorId}", + name: "Green" + } + } + } + } + }] + }] + } + ) { + ${Product.plural} { + id + photos { + id + name + color { + id + name + } + } + } + } + } + `; + + await testHelper.executeCypher( + ` + CREATE (product:${Product} {name: "Pringles", id: $productId}) + `, + { + productId, + } + ); + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + + expect((gqlResult?.data?.[Product.operations.update]?.[Product.plural] as any[])[0]).toMatchObject({ + id: productId, + photos: [{ id: photoId, name: "Green Photo", color: { id: colorId, name: "Green" } }], + }); + }); + + test("should update a Product via creating a new Photo and creating a new Color (via top level create)", async () => { + const typeDefs = /* GraphQL */ ` + type ${Product} @node { + id: ID + name: String + photos: [${Photo}!]! @relationship(type: "HAS_PHOTO", direction: OUT) + } + + + type ${Color} @node { + name: String + id: ID + } + + type ${Photo} @node { + id: ID + name: String + color: ${Color}! @relationship(type: "OF_COLOR", direction: OUT) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const productId = generate({ + charset: "alphabetic", + }); + + const photoId = generate({ + charset: "alphabetic", + }); + + const colorId = generate({ + charset: "alphabetic", + }); + + const query = /* GraphQL */ ` + mutation { + ${Product.operations.update}( + where: { id_EQ: "${productId}" } + update: { + photos: { create:[{ + node: { + id: "${photoId}", + name: "Green Photo", + color: { + create: { + node: { + id: "${colorId}", + name: "Green" + } + } + } + } + }]} + } + ) { + ${Product.plural} { + id + photos { + id + name + color { + id + name + } + } + } + } + } + `; + + await testHelper.executeCypher( + ` + CREATE (product:${Product} {name: "Pringles", id: $productId}) + `, + { + productId, + } + ); + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + + expect((gqlResult?.data?.[Product.operations.update]?.[Product.plural] as any[])[0]).toMatchObject({ + id: productId, + photos: [{ id: photoId, name: "Green Photo", color: { id: colorId, name: "Green" } }], + }); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/update-relationship-no-implicit-set.int.test.ts b/packages/graphql/tests/integration/deprecations/update-relationship-no-implicit-set.int.test.ts new file mode 100644 index 0000000000..3fe2f79f4a --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/update-relationship-no-implicit-set.int.test.ts @@ -0,0 +1,310 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { generate } from "randomstring"; +import type { UniqueType } from "../../utils/graphql-types"; +import { TestHelper } from "../../utils/tests-helper"; + +describe("Update relationship properties (deprecated implicit _SET)", () => { + let testHelper: TestHelper; + let Movie: UniqueType; + let Actor: UniqueType; + let movieTitle: string; + let actor1: string; + let actor2: string; + let actor3: string; + + beforeEach(async () => { + testHelper = new TestHelper(); + Movie = testHelper.createUniqueType("Movie"); + Actor = testHelper.createUniqueType("Actor"); + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + title: String! + actors: [${Actor}!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) + } + + type ${Actor} @node { + name: String! + movies: [${Movie}!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) + } + + type ActedIn @relationshipProperties { + screenTime: Int! + } + `; + movieTitle = generate({ charset: "alphabetic" }); + actor1 = generate({ charset: "alphabetic" }); + actor2 = generate({ charset: "alphabetic" }); + actor3 = generate({ charset: "alphabetic" }); + await testHelper.initNeo4jGraphQL({ typeDefs }); + + await testHelper.executeCypher( + ` + CREATE (:${Actor} { name: '${actor1}' })-[:ACTED_IN { screenTime: 105 }]->(m:${Movie} { title: '${movieTitle}'}) + CREATE (m)<-[:ACTED_IN { screenTime: 100 }]-(:${Actor} { name: '${actor2}' }) + ` + ); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + test("Update a relationship property on a relationship between two specified nodes (update -> update)", async () => { + const mutation = /* GraphQL */ ` + mutation { + ${Movie.operations.update}( + where: { title_EQ: "${movieTitle}" } + update: { actors: [{ where: { node: { name_EQ: "${actor1}" } }, update: { edge: { screenTime: 60 } } }] } + ) { + ${Movie.plural} { + title + actorsConnection(sort: { edge: { screenTime: DESC }}) { + edges { + properties { + screenTime + } + node { + name + } + } + } + } + } + } + `; + + const result = await testHelper.executeGraphQL(mutation); + expect(result.errors).toBeFalsy(); + + expect((result?.data as any)[Movie.operations.update][Movie.plural]).toEqual([ + { + title: movieTitle, + actorsConnection: { + edges: [ + { + properties: { screenTime: 100 }, + node: { + name: actor2, + }, + }, + { + properties: { screenTime: 60 }, + node: { + name: actor1, + }, + }, + ], + }, + }, + ]); + }); + + test("Update properties on both the relationship and end node in a nested update (update -> update)", async () => { + const mutation = /* GraphQL */ ` + mutation { + ${Movie.operations.update}( + where: { title_EQ: "${movieTitle}" } + update: { + actors: [ + { + where: { node: { name_EQ: "${actor2}" } } + update: { + edge: { screenTime: 60 } + node: { name: "${actor3}" } + } + } + ] + } + ) { + ${Movie.plural} { + title + actorsConnection(sort: { edge: { screenTime: ASC }}) { + edges { + properties { + screenTime + } + node { + name + } + } + } + } + } + } + `; + + const result = await testHelper.executeGraphQL(mutation); + + expect(result.errors).toBeFalsy(); + + expect((result?.data as any)[Movie.operations.update][Movie.plural]).toEqual([ + { + title: movieTitle, + actorsConnection: { + edges: [ + { + properties: { screenTime: 60 }, + node: { + name: actor3, + }, + }, + { + properties: { screenTime: 105 }, + node: { + name: actor1, + }, + }, + ], + }, + }, + ]); + }); + + test("Create relationship node through update field on end node in a nested update (update -> update)", async () => { + const mutation = /* GraphQL */ ` + mutation { + ${Movie.operations.update}( + where: { title_EQ: "${movieTitle}" } + update: { + actors: [ + { + create: { + node: { name: "${actor3}" } + edge: { screenTime: 60 } + } + } + ] + } + ) { + ${Movie.plural} { + title + actorsConnection(sort: { edge: { screenTime: ASC }}) { + edges { + properties { + screenTime + } + node { + name + } + } + } + } + } + } + `; + + const result = await testHelper.executeGraphQL(mutation); + + expect(result.errors).toBeFalsy(); + + expect((result?.data as any)[Movie.operations.update][Movie.plural]).toEqual([ + { + title: movieTitle, + actorsConnection: { + edges: [ + { + properties: { screenTime: 60 }, + node: { + name: actor3, + }, + }, + { + properties: { screenTime: 100 }, + node: { + name: actor2, + }, + }, + { + properties: { screenTime: 105 }, + node: { + name: actor1, + }, + }, + ], + }, + }, + ]); + }); + + test("Create a relationship node with relationship properties on end node in a nested update (update -> create)", async () => { + const mutation = /* GraphQL */ ` + mutation { + ${Movie.operations.update}( + where: { title_EQ: "${movieTitle}" } + update: { + actors: { + create: { + node: { name: "${actor3}" } + edge: { screenTime: 60 } + } + } + } + ) { + ${Movie.plural} { + title + actorsConnection(sort: { edge: { screenTime: ASC }}) { + edges { + properties { + screenTime + } + node { + name + } + } + } + } + } + } + `; + + const result = await testHelper.executeGraphQL(mutation); + + expect(result.errors).toBeFalsy(); + + expect((result?.data as any)[Movie.operations.update][Movie.plural]).toEqual([ + { + title: movieTitle, + actorsConnection: { + edges: [ + { + properties: { screenTime: 60 }, + node: { + name: actor3, + }, + }, + { + properties: { screenTime: 100 }, + node: { + name: actor2, + }, + }, + { + properties: { screenTime: 105 }, + node: { + name: actor1, + }, + }, + ], + }, + }, + ]); + }); +}); diff --git a/packages/graphql/tests/integration/directives/alias.int.test.ts b/packages/graphql/tests/integration/directives/alias.int.test.ts index 3d40a6f688..0f544baff8 100644 --- a/packages/graphql/tests/integration/directives/alias.int.test.ts +++ b/packages/graphql/tests/integration/directives/alias.int.test.ts @@ -363,11 +363,11 @@ describe("@alias directive", () => { await testHelper.executeGraphQL(create); - const update = ` + const update = /* GraphQL */ ` mutation UpdateAll { ${AliasDirectiveTestUser.operations.update}( - where: {name_CONTAINS: "${name}"} - update: {name: "${newName}", likes: {update: {edge: {comment: "${newComment}"}, node: {title: "${newTitle}", year: ${newYear}}}}} + where: { name_CONTAINS: "${name}"} + update: { name_SET: "${newName}", likes: { update: { edge: { comment_SET: "${newComment}"}, node: { title_SET: "${newTitle}", year_SET: ${newYear}}}}} ) { ${AliasDirectiveTestUser.plural} { id diff --git a/packages/graphql/tests/integration/directives/alias/nodes.int.test.ts b/packages/graphql/tests/integration/directives/alias/nodes.int.test.ts index ba578d9efa..93403f9dbc 100644 --- a/packages/graphql/tests/integration/directives/alias/nodes.int.test.ts +++ b/packages/graphql/tests/integration/directives/alias/nodes.int.test.ts @@ -17,6 +17,7 @@ * limitations under the License. */ +import { GraphQLError } from "graphql"; import type { UniqueType } from "../../../utils/graphql-types"; import { TestHelper } from "../../../utils/tests-helper"; @@ -74,9 +75,10 @@ describe("@alias directive", () => { expect(gqlResult.errors).toBeDefined(); expect(gqlResult.errors).toHaveLength(1); - expect(gqlResult.errors?.[0]?.message).toBe( - `Conflicting modification of [[name]], [[nameAgain]] on type ${typeDirector.name}` - ); + expect(gqlResult.errors).toEqual([ + new GraphQLError(`Conflicting modification of [[name]], [[nameAgain]] on type ${typeDirector.name}`), + ]); + expect(gqlResult?.data?.[typeDirector.operations.create]?.[typeDirector.plural]).toBeUndefined(); }); test("Create mutation with alias referring to existing field, include only field as inputs", async () => { @@ -139,9 +141,10 @@ describe("@alias directive", () => { expect(gqlResult.errors).toBeDefined(); expect(gqlResult.errors).toHaveLength(1); - expect(gqlResult.errors?.[0]?.message).toBe( - `Conflicting modification of [[name]], [[nameAgain]] on type ${typeDirector.name}` - ); + expect(gqlResult.errors).toEqual([ + new GraphQLError(`Conflicting modification of [[name]], [[nameAgain]] on type ${typeDirector.name}`), + ]); + expect(gqlResult?.data?.[typeDirector.operations.create]?.[typeDirector.plural]).toBeUndefined(); }); test("Create mutation with alias on connection referring to existing field, include only field as inputs", async () => { @@ -215,9 +218,10 @@ describe("@alias directive", () => { expect(gqlResult.errors).toBeDefined(); expect(gqlResult.errors).toHaveLength(1); - expect(gqlResult.errors?.[0]?.message).toBe( - `Conflicting modification of [[title]], [[titleAgain]] on type ${typeMovie.name}` - ); + expect(gqlResult.errors).toEqual([ + new GraphQLError(`Conflicting modification of [[title]], [[titleAgain]] on type ${typeMovie.name}`), + ]); + expect(gqlResult?.data?.[typeDirector.operations.create]?.[typeDirector.plural]).toBeUndefined(); }); test("Create mutation with alias on nested connection referring to existing field, include only field as inputs", async () => { @@ -307,16 +311,17 @@ describe("@alias directive", () => { expect(gqlResult.errors).toBeDefined(); expect(gqlResult.errors).toHaveLength(1); - expect(gqlResult.errors?.[0]?.message).toBe( - `Conflicting modification of [[name]], [[nameAgain]] on type ${typeDirector.name}` - ); + expect(gqlResult.errors).toEqual([ + new GraphQLError(`Conflicting modification of [[name]], [[nameAgain]] on type ${typeDirector.name}`), + ]); + expect(gqlResult?.data?.[typeDirector.operations.create]?.[typeDirector.plural]).toBeUndefined(); }); test("Update mutation with alias referring to existing field, include both fields as inputs", async () => { - const userMutation = ` + const userMutation = /* GraphQL */ ` mutation { - ${typeDirector.operations.update}(where: {name_CONTAINS: "Tim"}, update: { name: "Tim Burton", nameAgain: "Timmy Burton" }) { + ${typeDirector.operations.update}(where: { name_CONTAINS: "Tim" }, update: { name_SET: "Tim Burton", nameAgain_SET: "Timmy Burton" }) { ${typeDirector.plural} { name nameAgain @@ -329,15 +334,16 @@ describe("@alias directive", () => { expect(gqlResult.errors).toBeDefined(); expect(gqlResult.errors).toHaveLength(1); - expect(gqlResult.errors?.[0]?.message).toBe( - `Conflicting modification of [[name]], [[nameAgain]] on type ${typeDirector.name}` - ); + expect(gqlResult.errors).toEqual([ + new GraphQLError(`Conflicting modification of [[name_SET]], [[nameAgain_SET]] on type ${typeDirector.name}`), + ]); + expect(gqlResult?.data?.[typeDirector.operations.update]?.[typeDirector.plural]).toBeUndefined(); }); test("Update mutation with alias referring to existing field, include only alias field as inputs", async () => { - const userMutation = ` + const userMutation = /* GraphQL */ ` mutation { - ${typeDirector.operations.update}(where: {name_CONTAINS: "Timmy"}, update: { nameAgain: "El Timmy Burton" }) { + ${typeDirector.operations.update}(where: { name_CONTAINS: "Timmy" }, update: { nameAgain_SET: "El Timmy Burton" }) { ${typeDirector.plural} { name nameAgain @@ -351,20 +357,20 @@ describe("@alias directive", () => { expect(gqlResult.errors).toBeUndefined(); }); test("Update mutation with alias referring to existing field, include connection and both fields as inputs", async () => { - const userMutation = ` + const userMutation = /* GraphQL */ ` mutation { ${typeDirector.operations.update}( - where: {name_CONTAINS: "Tim"}, + where: { name_CONTAINS: "Tim"}, update: { - name: "Tim Burton", - nameAgain: "Timmy Burton", + name_SET: "Tim Burton", + nameAgain_SET: "Timmy Burton", movies: [{ update: { node: { - title: "Three", + title_SET: "Three", }, edge: { - year: 2010 + year_SET: 2010 } } }] @@ -382,22 +388,23 @@ describe("@alias directive", () => { expect(gqlResult.errors).toBeDefined(); expect(gqlResult.errors).toHaveLength(1); - expect(gqlResult.errors?.[0]?.message).toBe( - `Conflicting modification of [[name]], [[nameAgain]] on type ${typeDirector.name}` - ); + expect(gqlResult.errors).toEqual([ + new GraphQLError(`Conflicting modification of [[name_SET]], [[nameAgain_SET]] on type ${typeDirector.name}`), + ]); + expect(gqlResult?.data?.[typeDirector.operations.update]?.[typeDirector.plural]).toBeUndefined(); }); test("Update mutation with alias on connection referring to existing field, include only field as inputs", async () => { - const userMutation = ` + const userMutation = /* GraphQL */ ` mutation { ${typeDirector.operations.update}( update: { - name: "Tim", + name_SET: "Tim", movies: [ { update: { node: { - title: "Mv", + title_SET: "Mv", } } } @@ -416,18 +423,18 @@ describe("@alias directive", () => { expect(gqlResult.errors).toBeUndefined(); }); test("Update mutation with alias on connection referring to existing field, include both fields as inputs", async () => { - const userMutation = ` + const userMutation = /* GraphQL */ ` mutation { - ${typeDirector.operations.update}(where: {name_CONTAINS: "Tim Burton"}, update:{ - name: "Tim Burton", + ${typeDirector.operations.update}(where: { name_CONTAINS: "Tim Burton" }, update: { + name_SET: "Tim Burton", movies: [{ update: { node: { - title: "One", - titleAgain: "Onee" + title_SET: "One", + titleAgain_SET: "Onee" }, edge: { - year: 2010 + year_SET: 2010 } } }] @@ -446,34 +453,34 @@ describe("@alias directive", () => { expect(gqlResult.errors).toBeDefined(); expect(gqlResult.errors).toHaveLength(1); - expect(gqlResult.errors?.[0]?.message).toBe( - `Conflicting modification of [[title]], [[titleAgain]] on type ${typeMovie.name}` - ); + expect(gqlResult.errors).toEqual([ + new GraphQLError(`Conflicting modification of [[title_SET]], [[titleAgain_SET]] on type ${typeMovie.name}`), + ]); expect(gqlResult?.data?.[typeDirector.operations.update]?.[typeDirector.plural]).toBeUndefined(); }); test("Update mutation with alias on connection referring to existing field, include both bad and good field as inputs", async () => { - const userMutation = ` + const userMutation = /* GraphQL */ ` mutation { - ${typeDirector.operations.update}(where: {name_CONTAINS: "Tim Burton"}, update:{ - name: "Tim Burton", + ${typeDirector.operations.update}(where: { name_CONTAINS: "Tim Burton" }, update: { + name_SET: "Tim Burton", movies: [{ update: { node: { - title: "Three", + title_SET: "Three", }, edge: { - year: 2010 + year_SET: 2010 } } }, { update: { node: { - title: "One", - titleAgain: "Onee" + title_SET: "One", + titleAgain_SET: "Onee" }, edge: { - year: 2010 + year_SET: 2010 } } }] @@ -492,33 +499,34 @@ describe("@alias directive", () => { expect(gqlResult.errors).toBeDefined(); expect(gqlResult.errors).toHaveLength(1); - expect(gqlResult.errors?.[0]?.message).toBe( - `Conflicting modification of [[title]], [[titleAgain]] on type ${typeMovie.name}` - ); + expect(gqlResult.errors).toEqual([ + new GraphQLError(`Conflicting modification of [[title_SET]], [[titleAgain_SET]] on type ${typeMovie.name}`), + ]); + expect(gqlResult?.data?.[typeDirector.operations.update]?.[typeDirector.plural]).toBeUndefined(); }); test("Update mutation with alias on nested connection referring to existing field, include only field as inputs", async () => { - const userMutation = ` + const userMutation = /* GraphQL */ ` mutation { - ${typeDirector.operations.update}(where: {name_CONTAINS: "Tim Burton"}, update:{ - name: "Tim Burton", + ${typeDirector.operations.update}(where: { name_CONTAINS: "Tim Burton" }, update: { + name_SET: "Tim Burton", movies: [{ update: { node: { - title: "Two", + title_SET: "Two", directors: [{ update: { node: { - nameAgain: "Timmy" + nameAgain_SET: "Timmy" }, edge: { - year: 2011 + year_SET: 2011 } } } ] }, edge: { - year: 2010 + year_SET: 2010 } } }] @@ -540,29 +548,30 @@ describe("@alias directive", () => { expect(gqlResult.errors).toBeUndefined(); }); + test("Update mutation with alias on nested connection referring to existing field, include both field as inputs", async () => { - const userMutation = ` + const userMutation = /* GraphQL */ ` mutation { - ${typeDirector.operations.update}(where: {name_CONTAINS: "Tim Burton"}, update:{ - name: "Tim Burton", + ${typeDirector.operations.update}(where: { name_CONTAINS: "Tim Burton" }, update: { + name_SET: "Tim Burton", movies: [{ update: { node: { - title: "Two", + title_SET: "Two", directors: [{ update: { node: { - name: "Tim", - nameAgain: "Timmy" + name_SET: "Tim", + nameAgain_SET: "Timmy" }, edge: { - year: 2011 + year_SET: 2011 } } } ] }, edge: { - year: 2010 + year_SET: 2010 } } }] @@ -584,19 +593,20 @@ describe("@alias directive", () => { expect(gqlResult.errors).toBeDefined(); expect(gqlResult.errors).toHaveLength(1); - expect(gqlResult.errors?.[0]?.message).toBe( - `Conflicting modification of [[name]], [[nameAgain]] on type ${typeDirector.name}` - ); + expect(gqlResult.errors).toEqual([ + new GraphQLError(`Conflicting modification of [[name_SET]], [[nameAgain_SET]] on type ${typeDirector.name}`), + ]); + expect(gqlResult?.data?.[typeDirector.operations.update]?.[typeDirector.plural]).toBeUndefined(); }); test("Update mutation nested with create with alias referring to existing field, include only alias field as inputs", async () => { - const userMutation = ` + const userMutation = /* GraphQL */ ` mutation { ${typeDirector.operations.update}( - where: {name_CONTAINS: "Timmy"}, + where: { name_CONTAINS: "Timmy" }, update: { - name: "The Timmy", + name_SET: "The Timmy", movies: [ { create: [ @@ -649,15 +659,16 @@ describe("@alias directive", () => { expect(gqlResult.errors).toBeDefined(); expect(gqlResult.errors).toHaveLength(1); - expect(gqlResult.errors?.[0]?.message).toBe( - `Conflicting modification of [[title]], [[titleAgain]] on type ${typeMovie.name}` - ); + expect(gqlResult.errors).toEqual([ + new GraphQLError(`Conflicting modification of [[title]], [[titleAgain]] on type ${typeMovie.name}`), + ]); + expect(gqlResult?.data?.[typeDirector.operations.update]?.[typeDirector.plural]).toBeUndefined(); }); test("Update mutation (with create) with alias referring to existing field, include both fields as inputs", async () => { - const userMutation = ` + const userMutation = /* GraphQL */ ` mutation { - ${typeDirector.operations.update}(where: {name_CONTAINS: "Timmy"}, update: { movies: { create: [{ node: { title: "Movie", titleAgain: "El Movie" }, edge: { year: 1989 } }] } }) { + ${typeDirector.operations.update}(where: { name_CONTAINS: "Timmy" }, update: { movies: { create: [{ node: { title: "Movie", titleAgain: "El Movie" }, edge: { year: 1989 } }] } }) { ${typeDirector.plural} { name nameAgain @@ -670,9 +681,10 @@ describe("@alias directive", () => { expect(gqlResult.errors).toBeDefined(); expect(gqlResult.errors).toHaveLength(1); - expect(gqlResult.errors?.[0]?.message).toBe( - `Conflicting modification of [[title]], [[titleAgain]] on type ${typeMovie.name}` - ); + expect(gqlResult.errors).toEqual([ + new GraphQLError(`Conflicting modification of [[title]], [[titleAgain]] on type ${typeMovie.name}`), + ]); + expect(gqlResult?.data?.[typeDirector.operations.update]?.[typeDirector.plural]).toBeUndefined(); }); }); diff --git a/packages/graphql/tests/integration/directives/authorization/allow.int.test.ts b/packages/graphql/tests/integration/directives/authorization/allow.int.test.ts index 1fb0771b7c..59ce44f1a0 100644 --- a/packages/graphql/tests/integration/directives/authorization/allow.int.test.ts +++ b/packages/graphql/tests/integration/directives/authorization/allow.int.test.ts @@ -426,7 +426,7 @@ describe("auth/allow", () => { describe("update", () => { test("should throw Forbidden when editing a node with invalid allow", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${userType.name} @node { id: ID } @@ -439,9 +439,9 @@ describe("auth/allow", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation { - ${userType.operations.update}(where: {id_EQ: "${userId}"}, update: {id: "new-id"}) { + ${userType.operations.update}(where: { id_EQ: "${userId}" }, update: { id_SET: "new-id" }) { ${userType.plural} { id } @@ -470,7 +470,7 @@ describe("auth/allow", () => { }); test("should throw Forbidden when editing a property with invalid allow", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${userType.name} { id: ID } @@ -485,9 +485,9 @@ describe("auth/allow", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation { - ${userType.operations.update}(where: {id_EQ: "${userId}"}, update: {password: "new-password"}) { + ${userType.operations.update}(where: { id_EQ: "${userId}"}, update: { password_SET: "new-password" }) { ${userType.plural} { id } @@ -516,7 +516,7 @@ describe("auth/allow", () => { }); test("should throw Forbidden when editing a nested node with invalid allow", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${postType.name} @node { id: ID content: String @@ -538,11 +538,11 @@ describe("auth/allow", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation { ${postType.operations.update}( where: { id_EQ: "${postId}" } - update: { creator: { update: { node: { id: "new-id" } } } } + update: { creator: { update: { node: { id_SET: "new-id" } } } } ) { ${postType.plural} { id @@ -572,7 +572,7 @@ describe("auth/allow", () => { }); test("should throw Forbidden when editing a nested node property with invalid allow", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${postType.name} @node { id: ID content: String @@ -596,11 +596,11 @@ describe("auth/allow", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation { ${postType.operations.update}( where: { id_EQ: "${postId}" } - update: { creator: { update: { node: { password: "new-password" } } } } + update: { creator: { update: { node: { password_SET: "new-password" } } } } ) { ${postType.plural} { id diff --git a/packages/graphql/tests/integration/directives/authorization/bind.int.test.ts b/packages/graphql/tests/integration/directives/authorization/bind.int.test.ts index 76d4e804c8..bd4e465211 100644 --- a/packages/graphql/tests/integration/directives/authorization/bind.int.test.ts +++ b/packages/graphql/tests/integration/directives/authorization/bind.int.test.ts @@ -427,7 +427,7 @@ describe("auth/bind", () => { describe("update", () => { test("should throw forbidden when updating a node with invalid bind", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @node { id: ID } @@ -439,9 +439,9 @@ describe("auth/bind", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation { - ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { id: "not bound" }) { + ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { id_SET: "not bound" }) { ${User.plural} { id } @@ -470,7 +470,7 @@ describe("auth/bind", () => { }); test("should throw forbidden when updating a nested node with invalid bind", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${Post} @node { id: ID creator: ${User}! @relationship(type: "HAS_POST", direction: IN) @@ -492,7 +492,7 @@ describe("auth/bind", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.update}( where: { id_EQ: "${userId}" }, @@ -501,7 +501,7 @@ describe("auth/bind", () => { where: { node: { id_EQ: "${postId}" } }, update: { node: { - creator: { update: { node: { id: "not bound" } } } + creator: { update: { node: { id_SET: "not bound" } } } } } } @@ -535,7 +535,7 @@ describe("auth/bind", () => { }); test("should throw forbidden when updating a node property with invalid bind", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @node { id: ID } @@ -549,11 +549,11 @@ describe("auth/bind", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.update}( where: { id_EQ: "${userId}" }, - update: { id: "not bound" } + update: { id_SET: "not bound" } ) { ${User.plural} { id @@ -584,7 +584,7 @@ describe("auth/bind", () => { describe("connect", () => { test("should throw forbidden when connecting a node property with invalid bind", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @node { id: ID } @@ -605,7 +605,7 @@ describe("auth/bind", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation { ${Post.operations.update}( where: { id_EQ: "${postId}" }, @@ -647,7 +647,7 @@ describe("auth/bind", () => { describe("disconnect", () => { test("should throw forbidden when disconnecting a node property with invalid bind", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @node { id: ID } @@ -668,7 +668,7 @@ describe("auth/bind", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation { ${Post.operations.update}( where: { id_EQ: "${postId}" }, diff --git a/packages/graphql/tests/integration/directives/authorization/is-authenticated.int.test.ts b/packages/graphql/tests/integration/directives/authorization/is-authenticated.int.test.ts index 0ed6e4724a..f8f6872f9a 100644 --- a/packages/graphql/tests/integration/directives/authorization/is-authenticated.int.test.ts +++ b/packages/graphql/tests/integration/directives/authorization/is-authenticated.int.test.ts @@ -798,7 +798,7 @@ describe("auth/is-authenticated", () => { describe("update", () => { test("should not throw if authenticated on type definition", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @authentication(operations: [UPDATE]) @node { id: ID name: String @@ -814,9 +814,9 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { - ${User.operations.update}(update: { id: "1" }) { + ${User.operations.update}(update: { id_SET: "1" }) { ${User.plural} { id } @@ -832,7 +832,7 @@ describe("auth/is-authenticated", () => { }); test("should not throw if authenticated with correct role on type definition", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -852,9 +852,9 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { - ${User.operations.update}(update: { id: "1" }) { + ${User.operations.update}(update: { id_SET: "1" }) { ${User.plural} { id } @@ -870,7 +870,7 @@ describe("auth/is-authenticated", () => { }); test("should throw if not authenticated on type definition", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @authentication(operations: [UPDATE]) @node { id: ID name: String @@ -886,9 +886,9 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { - ${User.operations.update}(update: { id: "1" }) { + ${User.operations.update}(update: { id_SET: "1" }) { ${User.plural} { id } @@ -908,7 +908,7 @@ describe("auth/is-authenticated", () => { }); test("should throw if authenticated with incorrect role on type definition", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -927,9 +927,9 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { - ${User.operations.update}(update: { id: "1" }) { + ${User.operations.update}(update: { id_SET: "1" }) { ${User.plural} { id } @@ -945,7 +945,7 @@ describe("auth/is-authenticated", () => { }); test("should not throw if authenticated on field definition", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @node { id: ID password: String @authentication(operations: [UPDATE]) @@ -961,9 +961,9 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { - ${User.operations.update}(update: { id: "1" }) { + ${User.operations.update}(update: { id_SET: "1" }) { ${User.plural} { id } @@ -979,7 +979,7 @@ describe("auth/is-authenticated", () => { }); test("should not throw if authenticated with correct role on field definition", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -999,9 +999,9 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { - ${User.operations.update}(update: { id: "1" }) { + ${User.operations.update}(update: { id_SET: "1" }) { ${User.plural} { id } @@ -1017,7 +1017,7 @@ describe("auth/is-authenticated", () => { }); test("should throw if not authenticated on field definition", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @node { id: ID password: String @authentication(operations: [UPDATE]) @@ -1033,9 +1033,9 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { - ${User.operations.update}(update: { password: "1" }) { + ${User.operations.update}(update: { password_SET: "1" }) { ${User.plural} { password } @@ -1055,7 +1055,7 @@ describe("auth/is-authenticated", () => { }); test("should throw if authenticated with incorrect role on field definition", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -1074,9 +1074,9 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { - ${User.operations.update}(update: { password: "1" }) { + ${User.operations.update}(update: { password_SET: "1" }) { ${User.plural} { password } @@ -1096,7 +1096,7 @@ describe("auth/is-authenticated", () => { test("should not throw if authenticated", async () => { const Post = testHelper.createUniqueType("Post"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${Post} @node { id: String content: String @@ -1132,7 +1132,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { connect: { where: { node: { id_EQ: "${postId}" } } } } }) { ${User.plural} { @@ -1157,7 +1157,7 @@ describe("auth/is-authenticated", () => { test("should not throw if authenticated with correct role", async () => { const Post = testHelper.createUniqueType("Post"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -1197,7 +1197,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { connect: { where: { node: { id_EQ: "${postId}" } } } } }) { ${User.plural} { @@ -1222,7 +1222,7 @@ describe("auth/is-authenticated", () => { test("should not throw if authenticated with correct role at nested level", async () => { const Post = testHelper.createUniqueType("Post"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -1259,7 +1259,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { connect: { where: { node: { id_EQ: "${postId}" } } } } }) { ${User.plural} { @@ -1284,7 +1284,7 @@ describe("auth/is-authenticated", () => { test("should throw if not authenticated", async () => { const Post = testHelper.createUniqueType("Post"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${Post} @node { id: String content: String @@ -1320,7 +1320,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { connect: { where: { node: { id_EQ: "${postId}" } } } } }) { ${User.plural} { @@ -1350,7 +1350,7 @@ describe("auth/is-authenticated", () => { test("should throw if not authenticated at nested level", async () => { const Post = testHelper.createUniqueType("Post"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${Post} @node { id: String content: String @@ -1383,7 +1383,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { connect: { where: { node: { id_EQ: "${postId}" } } } } }) { ${User.plural} { @@ -1413,7 +1413,7 @@ describe("auth/is-authenticated", () => { test("should throw if authenticated with incorrect roles", async () => { const Post = testHelper.createUniqueType("Post"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -1453,7 +1453,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { connect: { where: { node: { id_EQ: "${postId}" } } } } }) { ${User.plural} { @@ -1478,7 +1478,7 @@ describe("auth/is-authenticated", () => { test("should throw if authenticated with incorrect roles at nested level", async () => { const Post = testHelper.createUniqueType("Post"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -1515,7 +1515,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { connect: { where: { node: { id_EQ: "${postId}" } } } } }) { ${User.plural} { @@ -1542,7 +1542,7 @@ describe("auth/is-authenticated", () => { test("should not throw if authenticated", async () => { const Post = testHelper.createUniqueType("Post"); - const typeDefs = ` + const typeDefs = /* GraphLQ */ ` type ${Post} @node { id: String content: String @@ -1578,7 +1578,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphLQ */ ` mutation { ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { disconnect: { where: { node: { id_EQ: "${postId}" } } } } }) { ${User.plural} { @@ -1603,7 +1603,7 @@ describe("auth/is-authenticated", () => { test("should not throw if authenticated with correct role", async () => { const Post = testHelper.createUniqueType("Post"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -1643,7 +1643,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { disconnect: { where: { node: { id_EQ: "${postId}" } } } } }) { ${User.plural} { @@ -1668,7 +1668,7 @@ describe("auth/is-authenticated", () => { test("should not throw if authenticated with correct role at nested level", async () => { const Post = testHelper.createUniqueType("Post"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -1705,7 +1705,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { disconnect: { where: { node: { id_EQ: "${postId}" } } } } }) { ${User.plural} { @@ -1730,7 +1730,7 @@ describe("auth/is-authenticated", () => { test("should throw if not authenticated", async () => { const Post = testHelper.createUniqueType("Post"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${Post} @node { id: String content: String @@ -1766,7 +1766,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { disconnect: { where: { node: { id_EQ: "${postId}" } } } } }) { ${User.plural} { @@ -1796,7 +1796,7 @@ describe("auth/is-authenticated", () => { test("should throw if not authenticated at nested level", async () => { const Post = testHelper.createUniqueType("Post"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${Post} @node { id: String content: String @@ -1829,7 +1829,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { disconnect: { where: { node: { id_EQ: "${postId}" } } } } }) { ${User.plural} { @@ -1859,7 +1859,7 @@ describe("auth/is-authenticated", () => { test("should throw if authenticated with incorrect roles", async () => { const Post = testHelper.createUniqueType("Post"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -1899,7 +1899,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { disconnect: { where: { node: { id_EQ: "${postId}" } } } } }) { ${User.plural} { @@ -1924,7 +1924,7 @@ describe("auth/is-authenticated", () => { test("should throw if authenticated with incorrect roles at nested level", async () => { const Post = testHelper.createUniqueType("Post"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -1961,7 +1961,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { disconnect: { where: { node: { id_EQ: "${postId}" } } } } }) { ${User.plural} { @@ -1986,7 +1986,7 @@ describe("auth/is-authenticated", () => { describe("delete", () => { test("should not throw if authenticated on type definition", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @authentication(operations: [DELETE]) @node { id: ID name: String @@ -2002,7 +2002,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.delete} { nodesDeleted @@ -2018,7 +2018,7 @@ describe("auth/is-authenticated", () => { }); test("should not throw if authenticated with correct role on type definition", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -2038,7 +2038,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.delete} { nodesDeleted @@ -2054,7 +2054,7 @@ describe("auth/is-authenticated", () => { }); test("should throw if not authenticated on type definition", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @authentication(operations: [DELETE]) @node { id: ID name: String @@ -2070,7 +2070,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.delete} { nodesDeleted @@ -2090,7 +2090,7 @@ describe("auth/is-authenticated", () => { }); test("should throw if not authenticated on type definition (with nested delete)", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @node { id: ID name: String @@ -2120,7 +2120,7 @@ describe("auth/is-authenticated", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.delete}(where: {id_EQ: "${userId}"}, delete:{ posts: {where:{node: { id_EQ: "${postId}"}}} }) { nodesDeleted @@ -2144,7 +2144,7 @@ describe("auth/is-authenticated", () => { }); test("should throw if authenticated with incorrect roles on type definition", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -2164,7 +2164,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.delete} { nodesDeleted @@ -2180,7 +2180,7 @@ describe("auth/is-authenticated", () => { }); test("should throw if authenticated with incorrect roles on type definition (with nested delete)", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -2214,7 +2214,7 @@ describe("auth/is-authenticated", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.delete}(where: {id_EQ: "${userId}"}, delete:{posts: {where:{node: { id_EQ: "${postId}"}}} }) { nodesDeleted @@ -2234,7 +2234,7 @@ describe("auth/is-authenticated", () => { }); test("should throw if not authenticated on type definition (with nested delete) on field", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @node { id: ID name: String @@ -2264,7 +2264,7 @@ describe("auth/is-authenticated", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.delete}(where: {id_EQ: "${userId}"}, delete:{ posts: {where:{node: { id_EQ: "${postId}"}}} }) { nodesDeleted @@ -2290,7 +2290,7 @@ describe("auth/is-authenticated", () => { describe("custom-resolvers", () => { test("should not throw if authenticated on custom Query with @cypher", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @mutation(operations: []) @query(read: false, aggregate: false) @node { id: ID name: String @@ -2310,7 +2310,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` query { users { id @@ -2326,7 +2326,7 @@ describe("auth/is-authenticated", () => { }); test("should not throw if authenticated with correct roles on custom Query with @cypher", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -2350,7 +2350,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` query { users { id @@ -2366,7 +2366,7 @@ describe("auth/is-authenticated", () => { }); test("should throw if not authenticated on custom Query with @cypher", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @mutation(operations: []) @query(read: false, aggregate: false) @node { id: ID name: String @@ -2386,7 +2386,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` query { users { id @@ -2406,7 +2406,7 @@ describe("auth/is-authenticated", () => { }); test("should throw if authenticated with incorrect role on custom Query with @cypher", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -2430,7 +2430,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` query { users { id @@ -2446,7 +2446,7 @@ describe("auth/is-authenticated", () => { }); test("should not throw if authenticated on custom Mutation with @cypher", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @node { id: ID name: String @@ -2466,7 +2466,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { createUser { id @@ -2482,7 +2482,7 @@ describe("auth/is-authenticated", () => { }); test("should not throw if authenticated with correct role on custom Mutation with @cypher", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -2506,7 +2506,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { createUser { id @@ -2522,7 +2522,7 @@ describe("auth/is-authenticated", () => { }); test("should throw if not authenticated on custom Mutation with @cypher", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @node { id: ID name: String @@ -2542,7 +2542,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { createUser { id @@ -2562,7 +2562,7 @@ describe("auth/is-authenticated", () => { }); test("should throw if authenticated with incorrect role on custom Mutation with @cypher", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -2586,7 +2586,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { createUser { id @@ -2604,7 +2604,7 @@ describe("auth/is-authenticated", () => { test("should not throw if authenticated on Field definition @cypher", async () => { const History = testHelper.createUniqueType("History"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${History} @node { url: String } @@ -2626,7 +2626,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` { ${User.plural} { history { @@ -2646,7 +2646,7 @@ describe("auth/is-authenticated", () => { test("should not throw if authenticated with correct role on Field definition @cypher", async () => { const History = testHelper.createUniqueType("History"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -2672,7 +2672,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` { ${User.plural} { history { @@ -2692,7 +2692,7 @@ describe("auth/is-authenticated", () => { test("should throw if not authenticated on Field definition @cypher", async () => { const History = testHelper.createUniqueType("History"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${History} @node { url: String } @@ -2714,7 +2714,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` { ${User.plural} { history { @@ -2738,7 +2738,7 @@ describe("auth/is-authenticated", () => { test("should throw if authenticated with incorrect role on Field definition @cypher", async () => { const History = testHelper.createUniqueType("History"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -2764,7 +2764,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` { ${User.plural} { history { @@ -2782,7 +2782,7 @@ describe("auth/is-authenticated", () => { }); test("should not throw if decoded JWT passed in context", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${Product} @authentication(operations: [READ]) @node { id: ID name: String @@ -2798,7 +2798,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` { ${Product.plural} { id @@ -2820,7 +2820,7 @@ describe("auth/is-authenticated", () => { }); test("should not throw if decoded JWT passed in context matches claim", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { name: String! } @@ -2840,7 +2840,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` { ${Product.plural} { id @@ -2862,7 +2862,7 @@ describe("auth/is-authenticated", () => { }); test("should throw if decoded JWT passed in context does not matches claim", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { name: String! } @@ -2882,7 +2882,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` { ${Product.plural} { id @@ -2907,7 +2907,7 @@ describe("auth/is-authenticated", () => { describe("schema", () => { describe("read", () => { beforeEach(async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${Product} @node { id: ID name: String @@ -2926,7 +2926,7 @@ describe("auth/is-authenticated", () => { }); test("should throw if not authenticated type definition", async () => { - const query = ` + const query = /* GraphQL */ ` { ${Product.plural} { id @@ -2946,7 +2946,7 @@ describe("auth/is-authenticated", () => { }); test("should not throw if authenticated type definition", async () => { - const query = ` + const query = /* GraphQL */ ` { ${Product.plural} { id @@ -2963,7 +2963,7 @@ describe("auth/is-authenticated", () => { }); describe("create", () => { beforeEach(async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @node { id: ID name: String @@ -2982,7 +2982,7 @@ describe("auth/is-authenticated", () => { }); test("should throw if not authenticated type definition", async () => { - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.create}(input: [{ id: "1" }]) { ${User.plural} { @@ -3004,7 +3004,7 @@ describe("auth/is-authenticated", () => { }); test("should not throw if authenticated type definition", async () => { - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.create}(input: [{ id: "1" }]) { ${User.plural} { @@ -3023,7 +3023,7 @@ describe("auth/is-authenticated", () => { }); describe("update", () => { beforeEach(async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @node { id: ID name: String @@ -3042,9 +3042,9 @@ describe("auth/is-authenticated", () => { }); test("should throw if not authenticated type definition", async () => { - const query = ` + const query = /* GraphQL */ ` mutation { - ${User.operations.update}(update: { id: "1" }) { + ${User.operations.update}(update: { id_SET: "1" }) { ${User.plural} { id } @@ -3066,7 +3066,7 @@ describe("auth/is-authenticated", () => { test("should not throw if authenticated type definition", async () => { const query = ` mutation { - ${User.operations.update}(update: { id: "1" }) { + ${User.operations.update}(update: { id_SET: "1" }) { ${User.plural} { id } diff --git a/packages/graphql/tests/integration/directives/authorization/roles.int.test.ts b/packages/graphql/tests/integration/directives/authorization/roles.int.test.ts index 95f69f7709..fca4dd93fd 100644 --- a/packages/graphql/tests/integration/directives/authorization/roles.int.test.ts +++ b/packages/graphql/tests/integration/directives/authorization/roles.int.test.ts @@ -383,7 +383,7 @@ describe("auth/roles", () => { describe("update", () => { test("should throw if missing role on type definition", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -398,9 +398,9 @@ describe("auth/roles", () => { } `; - const query = ` + const query = /* GraphQL */ ` mutation { - ${typeUser.operations.update}(update: { id: "1" }) { + ${typeUser.operations.update}(update: { id_SET: "1" }) { ${typeUser.plural} { id } @@ -425,7 +425,7 @@ describe("auth/roles", () => { }); test("should throw if missing role on field definition", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -440,9 +440,9 @@ describe("auth/roles", () => { } `; - const query = ` + const query = /* GraphQL */ ` mutation { - ${typeUser.operations.update}(update: { password: "1" }) { + ${typeUser.operations.update}(update: { password_SET: "1" }) { ${typeUser.plural} { password } @@ -469,7 +469,7 @@ describe("auth/roles", () => { describe("connect", () => { test("should throw if missing role", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -508,9 +508,9 @@ describe("auth/roles", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation { - ${typeUser.operations.update}(update: { id: "${userId}", posts: { connect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${typeUser.operations.update}(update: { id_SET: "${userId}", posts: { connect: { where: { node: { id_EQ: "${postId}" } } } } }) { ${typeUser.plural} { id } @@ -629,7 +629,7 @@ describe("auth/roles", () => { describe("disconnect", () => { test("should throw if missing role", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -668,9 +668,9 @@ describe("auth/roles", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation { - ${typeUser.operations.update}(update: { id: "${userId}", posts: { disconnect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${typeUser.operations.update}(update: { id_SET: "${userId}", posts: { disconnect: { where: { node: { id_EQ: "${postId}" } } } } }) { ${typeUser.plural} { id } diff --git a/packages/graphql/tests/integration/directives/authorization/where.int.test.ts b/packages/graphql/tests/integration/directives/authorization/where.int.test.ts index f710d67345..8e33e52a02 100644 --- a/packages/graphql/tests/integration/directives/authorization/where.int.test.ts +++ b/packages/graphql/tests/integration/directives/authorization/where.int.test.ts @@ -377,7 +377,7 @@ describe("auth/where", () => { describe("update", () => { test("should add $jwt.id to where", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @node { id: ID } @@ -392,9 +392,9 @@ describe("auth/where", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation { - ${User.operations.update}(update: { id: "${newUserId}" }){ + ${User.operations.update}(update: { id_SET: "${newUserId}" }){ ${User.plural} { id } diff --git a/packages/graphql/tests/integration/directives/populatedBy.int.test.ts b/packages/graphql/tests/integration/directives/populatedBy.int.test.ts index 12644c10ab..913873aaf3 100644 --- a/packages/graphql/tests/integration/directives/populatedBy.int.test.ts +++ b/packages/graphql/tests/integration/directives/populatedBy.int.test.ts @@ -189,7 +189,7 @@ describe("@populatedBy directive - Relationship properties", () => { charset: "alphabetic", }); - const mutation = ` + const mutation = /* GraphQL */ ` mutation { ${testMovie.operations.update}( where: { id_EQ: "${movieId}" }, @@ -197,7 +197,7 @@ describe("@populatedBy directive - Relationship properties", () => { genres: { update: { edge: { - id: "${relId}" + id_SET: "${relId}" } } } @@ -348,7 +348,7 @@ describe("@populatedBy directive - Relationship properties", () => { genres: { update: { edge: { - id: "${relId}" + id_SET: "${relId}" } } } @@ -579,7 +579,7 @@ describe("@populatedBy directive - Relationship properties", () => { charset: "alphabetic", }); - const mutation = ` + const mutation = /* GraphQL */ ` mutation { ${testMovie.operations.update}( where: { id_EQ: "${movieId}" }, @@ -587,7 +587,7 @@ describe("@populatedBy directive - Relationship properties", () => { genres: { update: { edge: { - id: "${relId}" + id_SET: "${relId}" } } } @@ -705,7 +705,7 @@ describe("@populatedBy directive - Relationship properties", () => { charset: "alphabetic", }); - const mutation = ` + const mutation = /* GraphQL */ ` mutation { ${testMovie.operations.create}(input: [ { @@ -744,7 +744,7 @@ describe("@populatedBy directive - Relationship properties", () => { genres: { update: { edge: { - id: "${relId}" + id_SET: "${relId}" } } } @@ -924,7 +924,7 @@ describe("@populatedBy directive - Relationship properties", () => { test("should have access to parent in callback function for UPDATE", async () => { const testMovie = testHelper.createUniqueType("Movie"); const testGenre = testHelper.createUniqueType("Genre"); - const callback = (parent) => `${parent.title}-slug`; + const callback = (parent) => `${parent.title_SET}-slug`; const typeDefs = /* GraphQL */ ` type ${testMovie.name} @node { @@ -971,37 +971,37 @@ describe("@populatedBy directive - Relationship properties", () => { charset: "alphabetic", }); - const mutation = ` - mutation { - ${testMovie.operations.update}( - where: { id_EQ: "${movieId}" }, - update: { - genres: { - update: { - edge: { - id: "${relId}" - title: "${movieTitle}" + const mutation = /* GraphQL */ ` + mutation { + ${testMovie.operations.update}( + where: { id_EQ: "${movieId}" }, + update: { + genres: { + update: { + edge: { + id_SET: "${relId}" + title_SET: "${movieTitle}" + } } } } - } - ) { - ${testMovie.plural} { - id - genresConnection { - edges { - properties { - title - slug - } - node { - id + ) { + ${testMovie.plural} { + id + genresConnection { + edges { + properties { + title + slug + } + node { + id + } } } } } } - } `; await testHelper.executeCypher(` diff --git a/packages/graphql/tests/integration/directives/populatedBy/populatedBy-node-properties.int.test.ts b/packages/graphql/tests/integration/directives/populatedBy/populatedBy-node-properties.int.test.ts index 09d7e98bac..8458e7b536 100644 --- a/packages/graphql/tests/integration/directives/populatedBy/populatedBy-node-properties.int.test.ts +++ b/packages/graphql/tests/integration/directives/populatedBy/populatedBy-node-properties.int.test.ts @@ -87,16 +87,16 @@ describe("@populatedBy directive - Node properties", () => { const movieId = "movie_id"; - const mutation = ` - mutation { - ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id: "${movieId}" }) { - ${testMovie.plural} { - id - callback - } + const mutation = /* GraphQL */ ` + mutation { + ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id_SET: "${movieId}" }) { + ${testMovie.plural} { + id + callback } } - `; + } + `; await testHelper.executeCypher(` CREATE (:${testMovie.name} { id: "${movieId}" }) @@ -153,22 +153,22 @@ describe("@populatedBy directive - Node properties", () => { const movieId = "movie_id"; - const mutation = ` - mutation { - ${testMovie.operations.create}(input: [{ id: "${movieId}" }]) { - ${testMovie.plural} { - id - callback - } + const mutation = /* GraphQL */ ` + mutation { + ${testMovie.operations.create}(input: [{ id: "${movieId}" }]) { + ${testMovie.plural} { + id + callback } - ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id: "${movieId}" }) { - ${testMovie.plural} { - id - callback - } + } + ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id_SET: "${movieId}" }) { + ${testMovie.plural} { + id + callback } } - `; + } + `; const result = await testHelper.executeGraphQL(mutation); @@ -317,16 +317,16 @@ describe("@populatedBy directive - Node properties", () => { const movieId = "movie_id"; - const mutation = ` - mutation { - ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id: "${movieId}" }) { - ${testMovie.plural} { - id - callback - } + const mutation = /* GraphQL */ ` + mutation { + ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id_SET: "${movieId}" }) { + ${testMovie.plural} { + id + callback } } - `; + } + `; await testHelper.executeCypher(` CREATE (:${testMovie.name} { id: "${movieId}" }) @@ -381,22 +381,22 @@ describe("@populatedBy directive - Node properties", () => { const movieId = "movie_id"; - const mutation = ` - mutation { - ${testMovie.operations.create}(input: [{ id: "${movieId}" }]) { - ${testMovie.plural} { - id - callback - } + const mutation = /* GraphQL */ ` + mutation { + ${testMovie.operations.create}(input: [{ id: "${movieId}" }]) { + ${testMovie.plural} { + id + callback } - ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id: "${movieId}" }) { - ${testMovie.plural} { - id - callback - } + } + ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id_SET: "${movieId}" }) { + ${testMovie.plural} { + id + callback } } - `; + } + `; const result = await testHelper.executeGraphQL(mutation); @@ -547,16 +547,16 @@ describe("@populatedBy directive - Node properties", () => { const movieId = "movie_id"; - const mutation = ` - mutation { - ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id: "${movieId}" }) { - ${testMovie.plural} { - id - callback - } + const mutation = /* GraphQL */ ` + mutation { + ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id_SET: "${movieId}" }) { + ${testMovie.plural} { + id + callback } } - `; + } + `; await testHelper.executeCypher(` CREATE (:${testMovie.name} { id: "${movieId}" }) @@ -613,22 +613,22 @@ describe("@populatedBy directive - Node properties", () => { const movieId = "movie_id"; - const mutation = ` - mutation { - ${testMovie.operations.create}(input: [{ id: "${movieId}" }]) { - ${testMovie.plural} { - id - callback - } + const mutation = /* GraphQL */ ` + mutation { + ${testMovie.operations.create}(input: [{ id: "${movieId}" }]) { + ${testMovie.plural} { + id + callback } - ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id: "${movieId}" }) { - ${testMovie.plural} { - id - callback - } + } + ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id_SET: "${movieId}" }) { + ${testMovie.plural} { + id + callback } } - `; + } + `; const result = await testHelper.executeGraphQL(mutation); @@ -777,20 +777,20 @@ describe("@populatedBy directive - Node properties", () => { const movieId = "movie_id"; - const mutation = ` - mutation { - ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id: "${movieId}" }) { - ${testMovie.plural} { - id - callback - } + const mutation = /* GraphQL */ ` + mutation { + ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id_SET: "${movieId}" }) { + ${testMovie.plural} { + id + callback } } - `; + } + `; await testHelper.executeCypher(` - CREATE (:${testMovie.name} { id: "${movieId}" }) - `); + CREATE (:${testMovie.name} { id: "${movieId}" }) + `); const result = await testHelper.executeGraphQL(mutation); @@ -841,22 +841,22 @@ describe("@populatedBy directive - Node properties", () => { const movieId = "movie_id"; - const mutation = ` - mutation { - ${testMovie.operations.create}(input: [{ id: "${movieId}" }]) { - ${testMovie.plural} { - id - callback - } + const mutation = /* GraphQL */ ` + mutation { + ${testMovie.operations.create}(input: [{ id: "${movieId}" }]) { + ${testMovie.plural} { + id + callback } - ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id: "${movieId}" }) { - ${testMovie.plural} { - id - callback - } + } + ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id_SET: "${movieId}" }) { + ${testMovie.plural} { + id + callback } } - `; + } + `; const result = await testHelper.executeGraphQL(mutation); @@ -906,16 +906,16 @@ describe("@populatedBy directive - Node properties", () => { const movieId = "movie_id"; - const mutation = ` - mutation { - ${testMovie.operations.create}(input: [{ id: "${movieId}" }]) { - ${testMovie.plural} { - id - callback - } + const mutation = /* GraphQL */ ` + mutation { + ${testMovie.operations.create}(input: [{ id: "${movieId}" }]) { + ${testMovie.plural} { + id + callback } } - `; + } + `; const result = await testHelper.executeGraphQL(mutation); @@ -1005,20 +1005,20 @@ describe("@populatedBy directive - Node properties", () => { const movieId = "movie_id"; - const mutation = ` - mutation { - ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id: "${movieId}" }) { - ${testMovie.plural} { - id - callback - } + const mutation = /* GraphQL */ ` + mutation { + ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id_SET: "${movieId}" }) { + ${testMovie.plural} { + id + callback } } - `; + } + `; await testHelper.executeCypher(` - CREATE (:${testMovie.name} { id: "${movieId}" }) - `); + CREATE (:${testMovie.name} { id: "${movieId}" }) + `); const result = await testHelper.executeGraphQL(mutation); @@ -1069,22 +1069,22 @@ describe("@populatedBy directive - Node properties", () => { const movieId = "movie_id"; - const mutation = ` - mutation { - ${testMovie.operations.create}(input: [{ id: "${movieId}" }]) { - ${testMovie.plural} { - id - callback - } + const mutation = /* GraphQL */ ` + mutation { + ${testMovie.operations.create}(input: [{ id: "${movieId}" }]) { + ${testMovie.plural} { + id + callback } - ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id: "${movieId}" }) { - ${testMovie.plural} { - id - callback - } + } + ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id_SET: "${movieId}" }) { + ${testMovie.plural} { + id + callback } } - `; + } + `; const result = await testHelper.executeGraphQL(mutation); @@ -1233,20 +1233,20 @@ describe("@populatedBy directive - Node properties", () => { const movieId = "movie_id"; - const mutation = ` - mutation { - ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id: "${movieId}" }) { - ${testMovie.plural} { - id - callback - } + const mutation = /* GraphQL */ ` + mutation { + ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id_SET: "${movieId}" }) { + ${testMovie.plural} { + id + callback } } - `; + } + `; await testHelper.executeCypher(` - CREATE (:${testMovie.name} { id: "${movieId}" }) - `); + CREATE (:${testMovie.name} { id: "${movieId}" }) + `); const result = await testHelper.executeGraphQL(mutation); @@ -1297,22 +1297,22 @@ describe("@populatedBy directive - Node properties", () => { const movieId = "movie_id"; - const mutation = ` - mutation { - ${testMovie.operations.create}(input: [{ id: "${movieId}" }]) { - ${testMovie.plural} { - id - callback - } + const mutation = /* GraphQL */ ` + mutation { + ${testMovie.operations.create}(input: [{ id: "${movieId}" }]) { + ${testMovie.plural} { + id + callback } - ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id: "${movieId}" }) { - ${testMovie.plural} { - id - callback - } + } + ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id_SET: "${movieId}" }) { + ${testMovie.plural} { + id + callback } } - `; + } + `; const result = await testHelper.executeGraphQL(mutation); @@ -1465,9 +1465,9 @@ describe("@populatedBy directive - Node properties", () => { const movieId = "movie_id"; - const mutation = ` + const mutation = /* GraphQL */ ` mutation { - ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id: "${movieId}" }) { + ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id_SET: "${movieId}" }) { ${testMovie.plural} { id callback @@ -1623,16 +1623,16 @@ describe("@populatedBy directive - Node properties", () => { const movieId = "movie_id"; - const mutation = ` - mutation { - ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id: "${movieId}" }) { - ${testMovie.plural} { - id - callback - } + const mutation = /* GraphQL */ ` + mutation { + ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id_SET: "${movieId}" }) { + ${testMovie.plural} { + id + callback } } - `; + } + `; await testHelper.executeCypher(` CREATE (:${testMovie.name} { id: "${movieId}" }) @@ -1781,20 +1781,20 @@ describe("@populatedBy directive - Node properties", () => { const movieId = "movie_id"; - const mutation = ` - mutation { - ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id: "${movieId}" }) { - ${testMovie.plural} { - id - callback - } + const mutation = /* GraphQL */ ` + mutation { + ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id_SET: "${movieId}" }) { + ${testMovie.plural} { + id + callback } } - `; + } + `; await testHelper.executeCypher(` - CREATE (:${testMovie.name} { id: "${movieId}" }) - `); + CREATE (:${testMovie.name} { id: "${movieId}" }) + `); const result = await testHelper.executeGraphQL(mutation); @@ -1939,9 +1939,9 @@ describe("@populatedBy directive - Node properties", () => { const movieId = "movie_id"; - const mutation = ` + const mutation = /* GraphQL */ ` mutation { - ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id: "${movieId}" }) { + ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id_SET: "${movieId}" }) { ${testMovie.plural} { id callback @@ -1951,8 +1951,8 @@ describe("@populatedBy directive - Node properties", () => { `; await testHelper.executeCypher(` - CREATE (:${testMovie.name} { id: "${movieId}" }) - `); + CREATE (:${testMovie.name} { id: "${movieId}" }) + `); const result = await testHelper.executeGraphQL(mutation); @@ -2097,20 +2097,20 @@ describe("@populatedBy directive - Node properties", () => { const movieId = "movie_id"; - const mutation = ` - mutation { - ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id: "${movieId}" }) { - ${testMovie.plural} { - id - callback - } + const mutation = /* GraphQL */ ` + mutation { + ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id_SET: "${movieId}" }) { + ${testMovie.plural} { + id + callback } } - `; + } + `; await testHelper.executeCypher(` - CREATE (:${testMovie.name} { id: "${movieId}" }) - `); + CREATE (:${testMovie.name} { id: "${movieId}" }) + `); const result = await testHelper.executeGraphQL(mutation); @@ -2255,16 +2255,16 @@ describe("@populatedBy directive - Node properties", () => { const movieId = "movie_id"; - const mutation = ` - mutation { - ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id: "${movieId}" }) { - ${testMovie.plural} { - id - callback - } + const mutation = /* GraphQL */ ` + mutation { + ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id_SET: "${movieId}" }) { + ${testMovie.plural} { + id + callback } } - `; + } + `; await testHelper.executeCypher(` CREATE (:${testMovie.name} { id: "${movieId}" }) @@ -2359,16 +2359,16 @@ describe("@populatedBy directive - Node properties", () => { const movieId = "movie_id"; - const mutation = ` - mutation { - ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id: "${movieId}" }) { - ${testMovie.plural} { - id - callback - } + const mutation = /* GraphQL */ ` + mutation { + ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id_SET: "${movieId}" }) { + ${testMovie.plural} { + id + callback } } - `; + } + `; await testHelper.executeCypher(` CREATE (:${testMovie.name} { id: "${movieId}", callback: "${string1}" }) @@ -2415,16 +2415,16 @@ describe("@populatedBy directive - Node properties", () => { const movieId = "movie_id"; - const mutation = ` - mutation { - ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id: "${movieId}" }) { - ${testMovie.plural} { - id - callback - } + const mutation = /* GraphQL */ ` + mutation { + ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id_SET: "${movieId}" }) { + ${testMovie.plural} { + id + callback } } - `; + } + `; await testHelper.executeCypher(` CREATE (:${testMovie.name} { id: "${movieId}", callback: "${string1}" }) @@ -2504,7 +2504,7 @@ describe("@populatedBy directive - Node properties", () => { test("should have access to parent in callback function for UPDATE", async () => { const testMovie = testHelper.createUniqueType("Movie"); - const callback = (parent) => `${parent.title}-slug`; + const callback = (parent) => `${parent.title_SET}-slug`; const typeDefs = /* GraphQL */ ` type ${testMovie.name} @node { @@ -2529,9 +2529,9 @@ describe("@populatedBy directive - Node properties", () => { const movieId = "movie_id"; - const mutation = ` + const mutation = /* GraphQL */ ` mutation { - ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id: "${movieId}", title: "${movieTitle}" }) { + ${testMovie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id_SET: "${movieId}", title_SET: "${movieTitle}" }) { ${testMovie.plural} { id title @@ -2694,16 +2694,16 @@ describe("@populatedBy directive - Node properties", () => { const movieId = "movie_id"; - const mutation = ` - mutation { - ${testMovie.operations.create}(input: [{ id: "${movieId}" }]) { - ${testMovie.plural} { - id - callback - } + const mutation = /* GraphQL */ ` + mutation { + ${testMovie.operations.create}(input: [{ id: "${movieId}" }]) { + ${testMovie.plural} { + id + callback } } - `; + } + `; const result = await testHelper.executeGraphQL(mutation); diff --git a/packages/graphql/tests/integration/directives/populatedBy/populatedBy-relationship-properties.int.test.ts b/packages/graphql/tests/integration/directives/populatedBy/populatedBy-relationship-properties.int.test.ts index e8ca070ab6..f9906839db 100644 --- a/packages/graphql/tests/integration/directives/populatedBy/populatedBy-relationship-properties.int.test.ts +++ b/packages/graphql/tests/integration/directives/populatedBy/populatedBy-relationship-properties.int.test.ts @@ -172,7 +172,7 @@ describe("@populatedBy directive - Relationship properties", () => { const genreId = "genre_id"; const relId = "relationship_id"; - const mutation = ` + const mutation = /* GraphQL */ ` mutation { ${testMovie.operations.update}( where: { id_EQ: "${movieId}" }, @@ -180,7 +180,7 @@ describe("@populatedBy directive - Relationship properties", () => { genres: { update: { edge: { - id: "${relId}" + id_SET: "${relId}" } } } @@ -284,7 +284,7 @@ describe("@populatedBy directive - Relationship properties", () => { const genreId = "genre_id"; const relId = "relationship_id"; - const mutation = ` + const mutation = /* GraphQL */ ` mutation { ${testMovie.operations.create}(input: [ { @@ -323,7 +323,7 @@ describe("@populatedBy directive - Relationship properties", () => { genres: { update: { edge: { - id: "${relId}" + id_SET: "${relId}" } } } @@ -542,7 +542,7 @@ describe("@populatedBy directive - Relationship properties", () => { const genreId = "genre_id"; const relId = "relationship_id"; - const mutation = ` + const mutation = /* GraphQL */ ` mutation { ${testMovie.operations.update}( where: { id_EQ: "${movieId}" }, @@ -550,7 +550,7 @@ describe("@populatedBy directive - Relationship properties", () => { genres: { update: { edge: { - id: "${relId}" + id_SET: "${relId}" } } } @@ -662,7 +662,7 @@ describe("@populatedBy directive - Relationship properties", () => { const genreId = "genre_id"; const relId = "relationship_id"; - const mutation = ` + const mutation = /* GraphQL */ ` mutation { ${testMovie.operations.create}(input: [ { @@ -701,7 +701,7 @@ describe("@populatedBy directive - Relationship properties", () => { genres: { update: { edge: { - id: "${relId}" + id_SET: "${relId}" } } } @@ -1040,7 +1040,7 @@ describe("@populatedBy directive - Relationship properties", () => { const genreId = "genre_id"; const relId = "relationship_id"; - const mutation = ` + const mutation = /* GraphQL */ ` mutation { ${testMovie.operations.create}(input: [ { @@ -1079,7 +1079,7 @@ describe("@populatedBy directive - Relationship properties", () => { genres: { update: { edge: { - id: "${relId}" + id_SET: "${relId}" } } } @@ -1286,7 +1286,7 @@ describe("@populatedBy directive - Relationship properties", () => { const genreId = "genre_id"; const relId = "relationship_id"; - const mutation = ` + const mutation = /* GraphQL */ ` mutation { ${testMovie.operations.update}( where: { id_EQ: "${movieId}" }, @@ -1294,7 +1294,7 @@ describe("@populatedBy directive - Relationship properties", () => { genres: { update: { edge: { - id: "${relId}" + id_SET: "${relId}" } } } @@ -1394,7 +1394,7 @@ describe("@populatedBy directive - Relationship properties", () => { const genreId = "genre_id"; const relId = "relationship_id"; - const mutation = ` + const mutation = /* GraphQL */ ` mutation { ${testMovie.operations.create}(input: [ { @@ -1433,7 +1433,7 @@ describe("@populatedBy directive - Relationship properties", () => { genres: { update: { edge: { - id: "${relId}" + id_SET: "${relId}" } } } @@ -1640,7 +1640,7 @@ describe("@populatedBy directive - Relationship properties", () => { const genreId = "genre_id"; const relId = "relationship_id"; - const mutation = ` + const mutation = /* GraphQL */ ` mutation { ${testMovie.operations.update}( where: { id_EQ: "${movieId}" }, @@ -1648,7 +1648,7 @@ describe("@populatedBy directive - Relationship properties", () => { genres: { update: { edge: { - id: "${relId}" + id_SET: "${relId}" } } } @@ -1748,7 +1748,7 @@ describe("@populatedBy directive - Relationship properties", () => { const genreId = "genre_id"; const relId = "relationship_id"; - const mutation = ` + const mutation = /* GraphQL */ ` mutation { ${testMovie.operations.create}(input: [ { @@ -1787,7 +1787,7 @@ describe("@populatedBy directive - Relationship properties", () => { genres: { update: { edge: { - id: "${relId}" + id_SET: "${relId}" } } } @@ -1891,7 +1891,7 @@ describe("@populatedBy directive - Relationship properties", () => { const genreId = "genre_id"; const relId = "relationship_id"; - const mutation = ` + const mutation = /* GraphQL */ ` mutation { ${testMovie.operations.create}(input: [ { @@ -1930,7 +1930,7 @@ describe("@populatedBy directive - Relationship properties", () => { genres: { update: { edge: { - id: "${relId}" + id_SET: "${relId}" } } } @@ -2105,7 +2105,7 @@ describe("@populatedBy directive - Relationship properties", () => { const genreId = "genre_id"; const relId = "relationship_id"; - const mutation = ` + const mutation = /* GraphQL */ ` mutation { ${testMovie.operations.update}( where: { id_EQ: "${movieId}" }, @@ -2113,7 +2113,7 @@ describe("@populatedBy directive - Relationship properties", () => { genres: { update: { edge: { - id: "${relId}" + id_SET: "${relId}" } } } @@ -2213,7 +2213,7 @@ describe("@populatedBy directive - Relationship properties", () => { const genreId = "genre_id"; const relId = "relationship_id"; - const mutation = ` + const mutation = /* GraphQL */ ` mutation { ${testMovie.operations.create}(input: [ { @@ -2252,7 +2252,7 @@ describe("@populatedBy directive - Relationship properties", () => { genres: { update: { edge: { - id: "${relId}" + id_SET: "${relId}" } } } @@ -2356,7 +2356,7 @@ describe("@populatedBy directive - Relationship properties", () => { const genreId = "genre_id"; const relId = "relationship_id"; - const mutation = ` + const mutation = /* GraphQL */ ` mutation { ${testMovie.operations.create}(input: [ { @@ -2395,7 +2395,7 @@ describe("@populatedBy directive - Relationship properties", () => { genres: { update: { edge: { - id: "${relId}" + id_SET: "${relId}" } } } @@ -2598,7 +2598,7 @@ describe("@populatedBy directive - Relationship properties", () => { const genreId = "genre_id"; const relId = "relationship_id"; - const mutation = ` + const mutation = /* GraphQL */ ` mutation { ${testMovie.operations.update}( where: { id_EQ: "${movieId}" }, @@ -2606,7 +2606,7 @@ describe("@populatedBy directive - Relationship properties", () => { genres: { update: { edge: { - id: "${relId}" + id_SET: "${relId}" } } } @@ -2697,7 +2697,7 @@ describe("@populatedBy directive - Relationship properties", () => { const genreId = "genre_id"; const relId = "relationship_id"; - const mutation = ` + const mutation = /* GraphQL */ ` mutation { ${testMovie.operations.create}(input: [ { @@ -2736,7 +2736,7 @@ describe("@populatedBy directive - Relationship properties", () => { genres: { update: { edge: { - id: "${relId}" + id_SET: "${relId}" } } } @@ -2925,7 +2925,7 @@ describe("@populatedBy directive - Relationship properties", () => { const genreId = "genre_id"; const relId = "relationship_id"; - const mutation = ` + const mutation = /* GraphQL */ ` mutation { ${testMovie.operations.update}( where: { id_EQ: "${movieId}" }, @@ -2933,7 +2933,7 @@ describe("@populatedBy directive - Relationship properties", () => { genres: { update: { edge: { - id: "${relId}" + id_SET: "${relId}" } } } @@ -3024,7 +3024,7 @@ describe("@populatedBy directive - Relationship properties", () => { const genreId = "genre_id"; const relId = "relationship_id"; - const mutation = ` + const mutation = /* GraphQL */ ` mutation { ${testMovie.operations.create}(input: [ { @@ -3063,7 +3063,7 @@ describe("@populatedBy directive - Relationship properties", () => { genres: { update: { edge: { - id: "${relId}" + id_SET: "${relId}" } } } @@ -3205,7 +3205,7 @@ describe("@populatedBy directive - Relationship properties", () => { test("should have access to parent in callback function for UPDATE", async () => { const testMovie = testHelper.createUniqueType("Movie"); const testGenre = testHelper.createUniqueType("Genre"); - const callback = (parent) => `${parent.title}-slug`; + const callback = (parent) => `${parent.title_SET}-slug`; const typeDefs = /* GraphQL */ ` type ${testMovie.name} @node { @@ -3246,7 +3246,7 @@ describe("@populatedBy directive - Relationship properties", () => { const genreId = "genre_id"; const relId = "relationship_id"; - const mutation = ` + const mutation = /* GraphQL */ ` mutation { ${testMovie.operations.update}( where: { id_EQ: "${movieId}" }, @@ -3254,8 +3254,8 @@ describe("@populatedBy directive - Relationship properties", () => { genres: { update: { edge: { - id: "${relId}" - title: "${movieTitle}" + id_SET: "${relId}" + title_SET: "${movieTitle}" } } } diff --git a/packages/graphql/tests/integration/directives/relationship/nestedOperations.int.test.ts b/packages/graphql/tests/integration/directives/relationship/nestedOperations.int.test.ts index 624da3a53e..e4773f7104 100644 --- a/packages/graphql/tests/integration/directives/relationship/nestedOperations.int.test.ts +++ b/packages/graphql/tests/integration/directives/relationship/nestedOperations.int.test.ts @@ -104,7 +104,7 @@ describe("@relationhip - nestedOperations", () => { `; updateMutationWithNestedUpdate = `#graphql mutation { - ${Movie.operations.update}(update: { actors: { update: { node: { name: "someName" } } } }) { + ${Movie.operations.update}(update: { actors: { update: { node: { name_SET: "someName" } } } }) { info { nodesCreated nodesDeleted @@ -494,7 +494,7 @@ describe("@relationhip - nestedOperations", () => { `; updateMutationWithNestedUpdate = `#graphql mutation { - ${Movie.operations.update}(update: { actors: { ${PersonOne}: { update: { node: { name: "someName" } } } } }) { + ${Movie.operations.update}(update: { actors: { ${PersonOne}: { update: { node: { name_SET: "someName" } } } } }) { info { nodesCreated nodesDeleted @@ -910,7 +910,7 @@ describe("@relationhip - nestedOperations", () => { `; updateMutationWithNestedUpdate = `#graphql mutation { - ${Movie.operations.update}(update: { actors: { update: { node: { name: "someName" } } } }) { + ${Movie.operations.update}(update: { actors: { update: { node: { name_SET: "someName" } } } }) { info { nodesCreated nodesDeleted diff --git a/packages/graphql/tests/integration/directives/timestamp/datetime.int.test.ts b/packages/graphql/tests/integration/directives/timestamp/datetime.int.test.ts index 6940011731..db2f78e6ed 100644 --- a/packages/graphql/tests/integration/directives/timestamp/datetime.int.test.ts +++ b/packages/graphql/tests/integration/directives/timestamp/datetime.int.test.ts @@ -156,9 +156,9 @@ describe("timestamp/datetime", () => { charset: "alphabetic", }); - const create = ` + const create = /* GraphQL */ ` mutation { - ${Movie.operations.update}(where: {id_EQ: "${id}"}, update: { id: "${id}" }) { + ${Movie.operations.update}(where: { id_EQ: "${id}" }, update: { id_SET: "${id}" }) { ${Movie.plural} { id } @@ -214,11 +214,11 @@ describe("timestamp/datetime", () => { charset: "alphabetic", }); - const update = ` + const update = /* GraphQL */ ` mutation($title: String!) { ${Movie.operations.update}( where: { title_EQ: $title } - update: { actors: [{ update: { edge: { screenTime: 60 } } }] } + update: { actors: [{ update: { edge: { screenTime_SET: 60 } } }] } ) { ${Movie.plural} { actorsConnection { @@ -380,11 +380,11 @@ describe("timestamp/datetime", () => { charset: "alphabetic", }); - const update = ` + const update = /* GraphQL */ ` mutation($title: String!) { ${Movie.operations.update}( where: { title_EQ: $title } - update: { actors: [{ update: { edge: { screenTime: 60 } } }] } + update: { actors: [{ update: { edge: { screenTime_SET: 60 } } }] } ) { ${Movie.plural} { actorsConnection { @@ -433,9 +433,9 @@ describe("timestamp/datetime", () => { charset: "alphabetic", }); - const create = ` + const create = /* GraphQL */ ` mutation { - ${Movie.operations.update}(where: {id_EQ: "${id}"}, update: { id: "${id}" }) { + ${Movie.operations.update}(where: {id_EQ: "${id}"}, update: { id_SET: "${id}" }) { ${Movie.plural} { id } @@ -594,11 +594,11 @@ describe("timestamp/datetime", () => { charset: "alphabetic", }); - const update = ` + const update = /* GraphQL */ ` mutation($title: String!) { ${Movie.operations.update}( where: { title_EQ: $title } - update: { actors: [{ update: { edge: { screenTime: 60 } } }] } + update: { actors: [{ update: { edge: { screenTime_SET: 60 } } }] } ) { ${Movie.plural} { actorsConnection { @@ -647,9 +647,9 @@ describe("timestamp/datetime", () => { charset: "alphabetic", }); - const create = ` + const create = /* GraphQL */ ` mutation { - ${Movie.operations.update}(where: {id_EQ: "${id}"}, update: { id: "${id}" }) { + ${Movie.operations.update}(where: { id_EQ: "${id}" }, update: { id_SET: "${id}" }) { ${Movie.plural} { id } diff --git a/packages/graphql/tests/integration/directives/timestamp/time.int.test.ts b/packages/graphql/tests/integration/directives/timestamp/time.int.test.ts index 60d7f48034..99d46c1019 100644 --- a/packages/graphql/tests/integration/directives/timestamp/time.int.test.ts +++ b/packages/graphql/tests/integration/directives/timestamp/time.int.test.ts @@ -166,9 +166,9 @@ describe("timestamp/time", () => { charset: "alphabetic", }); - const create = ` + const create = /* GraphQL */ ` mutation ($id: ID!) { - ${Movie.operations.update}(where: {id_EQ: $id}, update: { id: $id }) { + ${Movie.operations.update}(where: {id_EQ: $id}, update: { id_SET: $id }) { ${Movie.plural} { id } @@ -224,11 +224,11 @@ describe("timestamp/time", () => { }); const screenTime = 60; - const update = ` + const update = /* GraphQL */ ` mutation($title: String!, $screenTime: Int!) { ${Movie.operations.update}( where: { title_EQ: $title } - update: { actors: [{ update: { edge: { screenTime: $screenTime } } }] } + update: { actors: [{ update: { edge: { screenTime_SET: $screenTime } } }] } ) { ${Movie.plural} { actorsConnection { @@ -407,11 +407,11 @@ describe("timestamp/time", () => { }); const screenTime = 60; - const update = ` + const update = /* GraphQL */ ` mutation($title: String!, $screenTime: Int!) { ${Movie.operations.update}( where: { title_EQ: $title } - update: { actors: [{ update: { edge: { screenTime: $screenTime } } }] } + update: { actors: [{ update: { edge: { screenTime_SET: $screenTime } } }] } ) { ${Movie.plural} { actorsConnection { @@ -468,9 +468,9 @@ describe("timestamp/time", () => { charset: "alphabetic", }); - const create = ` + const create = /* GraphQL */ ` mutation ($id: ID!) { - ${Movie.operations.update}(where: {id_EQ: $id}, update: { id: $id }) { + ${Movie.operations.update}(where: {id_EQ: $id}, update: { id_SET: $id }) { ${Movie.plural} { id } @@ -609,7 +609,7 @@ describe("timestamp/time", () => { }); test("update timestamp on relationship property", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${Actor} @node { name: String! } @@ -635,11 +635,11 @@ describe("timestamp/time", () => { }); const screenTime = 60; - const update = ` + const update = /* GraphQL */ ` mutation($title: String!, $screenTime: Int!) { ${Movie.operations.update}( where: { title_EQ: $title } - update: { actors: [{ update: { edge: { screenTime: $screenTime } } }] } + update: { actors: [{ update: { edge: { screenTime_SET: $screenTime } } }] } ) { ${Movie.plural} { actorsConnection { @@ -696,9 +696,9 @@ describe("timestamp/time", () => { charset: "alphabetic", }); - const create = ` + const create = /* GraphQL */ ` mutation ($id: ID!) { - ${Movie.operations.update}(where: {id_EQ: $id}, update: { id: $id }) { + ${Movie.operations.update}(where: {id_EQ: $id}, update: { id_SET: $id }) { ${Movie.plural} { id } diff --git a/packages/graphql/tests/integration/interfaces/relationships/declare-relationship/interface-simple.int.test.ts b/packages/graphql/tests/integration/interfaces/relationships/declare-relationship/interface-simple.int.test.ts index 85254a51e1..5dc45e98e9 100644 --- a/packages/graphql/tests/integration/interfaces/relationships/declare-relationship/interface-simple.int.test.ts +++ b/packages/graphql/tests/integration/interfaces/relationships/declare-relationship/interface-simple.int.test.ts @@ -763,7 +763,7 @@ describe("interface with declared relationships", () => { const query = /* GraphQL */ ` mutation { - ${Actor.operations.update}(update: { actedIn: [{ update: { node: { actors: [{ update: { edge: { ActedIn: { screenTime: 0 } } } }] } } }] }) { + ${Actor.operations.update}(update: { actedIn: [{ update: { node: { actors: [{ update: { edge: { ActedIn: { screenTime_SET: 0 } } } }] } } }] }) { ${Actor.plural} { name actedInConnection { @@ -1045,7 +1045,13 @@ describe("interface with declared relationships", () => { update: { node: { actors: [{ - create: { node: { name: "custom actor" }, edge: { ActedIn: { screenTime: 101 }, StarredIn: { episodeNr: 101 } } } + create: { + node: { name: "custom actor" }, + edge: { + ActedIn: { screenTime: 101 }, + StarredIn: { episodeNr: 101 } + } + } }] } } diff --git a/packages/graphql/tests/integration/interfaces/relationships/declare-relationship/type-narrowing-mutations.int.test.ts b/packages/graphql/tests/integration/interfaces/relationships/declare-relationship/type-narrowing-mutations.int.test.ts index 209f84b267..51c7182110 100644 --- a/packages/graphql/tests/integration/interfaces/relationships/declare-relationship/type-narrowing-mutations.int.test.ts +++ b/packages/graphql/tests/integration/interfaces/relationships/declare-relationship/type-narrowing-mutations.int.test.ts @@ -109,7 +109,7 @@ describe("type narrowing - mutations setup", () => { const query = /* GraphQL */ ` mutation { - ${Actor.operations.update}(update: { actedIn: [{ update: { node: { actors: [{ update: { edge: { ActedIn: { screenTime: 0 } } } }] } } }] }) { + ${Actor.operations.update}(update: { actedIn: [{ update: { node: { actors: [{ update: { edge: { ActedIn: { screenTime_SET: 0 } } } }] } } }] }) { ${Actor.plural} { name actedInConnection { diff --git a/packages/graphql/tests/integration/interfaces/relationships/update/connect.int.test.ts b/packages/graphql/tests/integration/interfaces/relationships/update/connect.int.test.ts index cc2a46af16..809eb59d37 100644 --- a/packages/graphql/tests/integration/interfaces/relationships/update/connect.int.test.ts +++ b/packages/graphql/tests/integration/interfaces/relationships/update/connect.int.test.ts @@ -95,7 +95,7 @@ describe("interface relationships", () => { }); const seriesScreenTime = 69129; - const query = ` + const query = /* GraphQL */ ` mutation ConnectMovie($name: String, $title: String, $screenTime: Int!) { ${Actor.operations.update}( where: { name_EQ: $name } diff --git a/packages/graphql/tests/integration/interfaces/relationships/update/update.int.test.ts b/packages/graphql/tests/integration/interfaces/relationships/update/update.int.test.ts index 69fe8178e7..f7454fac14 100644 --- a/packages/graphql/tests/integration/interfaces/relationships/update/update.int.test.ts +++ b/packages/graphql/tests/integration/interfaces/relationships/update/update.int.test.ts @@ -100,12 +100,12 @@ describe("interface relationships", () => { }); const seriesScreenTime = 53301; - const query = ` + const query = /* GraphQL */ ` mutation UpdateUpdate($name: String, $oldTitle: String, $newTitle: String) { ${Actor.operations.update}( where: { name_EQ: $name } update: { - actedIn: { where: { node: { title_EQ: $oldTitle } }, update: { node: { title: $newTitle } } } + actedIn: { where: { node: { title_EQ: $oldTitle } }, update: { node: { title_SET: $newTitle } } } } ) { ${Actor.plural} { @@ -195,14 +195,14 @@ describe("interface relationships", () => { }); const seriesScreenTime = 38286; - const query = ` + const query = /* GraphQL */ ` mutation UpdateUpdate($name: String, $newName: String, $oldTitle: String, $newTitle: String) { ${Actor.operations.update}( where: { name_EQ: $name } update: { actedIn: { where: { node: { title_EQ: $oldTitle } } - update: { node: { title: $newTitle, actors: { update: { node: { name: $newName } } } } } + update: { node: { title_SET: $newTitle, actors: { update: { node: { name_SET: $newName } } } } } } } ) { diff --git a/packages/graphql/tests/integration/issues/1414.int.test.ts b/packages/graphql/tests/integration/issues/1414.int.test.ts index 314f6cf761..3191992179 100644 --- a/packages/graphql/tests/integration/issues/1414.int.test.ts +++ b/packages/graphql/tests/integration/issues/1414.int.test.ts @@ -75,9 +75,9 @@ describe("https://github.com/neo4j/graphql/issues/1414", () => { } `; - const updateProgrammeItems = ` + const updateProgrammeItems = /* GraphQL */ ` mutation { - ${testProgrammeItem.operations.update}(where: { id_EQ: "nanoid0" }, update: { productTitle: "TestPI2" }) { + ${testProgrammeItem.operations.update}(where: { id_EQ: "nanoid0" }, update: { productTitle_SET: "TestPI2" }) { ${testProgrammeItem.plural} { id productTitle diff --git a/packages/graphql/tests/integration/issues/1551.int.test.ts b/packages/graphql/tests/integration/issues/1551.int.test.ts index d3fd3329e4..b47ba0f304 100644 --- a/packages/graphql/tests/integration/issues/1551.int.test.ts +++ b/packages/graphql/tests/integration/issues/1551.int.test.ts @@ -69,7 +69,7 @@ describe("https://github.com/neo4j/graphql/issues/1551", () => { const updateMutation = ` mutation { - ${testType.operations.update}(where: { prodid_EQ: 1, attribid_EQ: 2 }, update: { level: null }) { + ${testType.operations.update}(where: { prodid_EQ: 1, attribid_EQ: 2 }, update: { level_SET: null }) { ${testType.plural} { prodid attribid diff --git a/packages/graphql/tests/integration/issues/2250.int.test.ts b/packages/graphql/tests/integration/issues/2250.int.test.ts index ef0ebb5767..2b222b381e 100644 --- a/packages/graphql/tests/integration/issues/2250.int.test.ts +++ b/packages/graphql/tests/integration/issues/2250.int.test.ts @@ -78,11 +78,7 @@ describe("https://github.com/neo4j/graphql/issues/2250", () => { }); test("nested update with create while using subscriptions should generate valid Cypher", async () => { - if (!cdcEnabled) { - console.log("CDC NOT AVAILABLE - SKIPPING"); - return; - } - const mutation = ` + const mutation = /* GraphQL */ ` mutation { ${Movie.operations.update}( update: { @@ -91,9 +87,9 @@ describe("https://github.com/neo4j/graphql/issues/2250", () => { { where: { node: { name_EQ: "Keanu Reeves" } } update: { - edge: { year: 2020 } + edge: { year_SET: 2020 } node: { - name: "KEANU Reeves" + name_SET: "KEANU Reeves" movies: [ { create: [ diff --git a/packages/graphql/tests/integration/issues/2782.int.test.ts b/packages/graphql/tests/integration/issues/2782.int.test.ts index b432daab21..119f75b288 100644 --- a/packages/graphql/tests/integration/issues/2782.int.test.ts +++ b/packages/graphql/tests/integration/issues/2782.int.test.ts @@ -77,12 +77,12 @@ describe("https://github.com/neo4j/graphql/issues/2782", () => { }); test("should update with nested disconnections", async () => { - const query = ` + const query = /* GraphQL */ ` mutation { ${Product.operations.update}( update: { - id: "123" - name: "Nested Connect" + id_SET: "123" + name_SET: "Nested Connect" colors: { disconnect: [ { diff --git a/packages/graphql/tests/integration/issues/2803.int.test.ts b/packages/graphql/tests/integration/issues/2803.int.test.ts index 6bf5c64170..48c27b55bb 100644 --- a/packages/graphql/tests/integration/issues/2803.int.test.ts +++ b/packages/graphql/tests/integration/issues/2803.int.test.ts @@ -651,7 +651,7 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { }); test("should be able to filter update mutations by node properties, edge properties and aggregations in nested connections", async () => { - const query = ` + const query = /* GraphQL */ ` mutation { ${Actor.operations.update}( where: { @@ -669,7 +669,7 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { } } } - update: { name: "${updatedName}" } + update: { name_SET: "${updatedName}" } ) { ${Actor.plural} { diff --git a/packages/graphql/tests/integration/issues/288.int.test.ts b/packages/graphql/tests/integration/issues/288.int.test.ts index eeae8a4357..0f5325e02f 100644 --- a/packages/graphql/tests/integration/issues/288.int.test.ts +++ b/packages/graphql/tests/integration/issues/288.int.test.ts @@ -56,7 +56,7 @@ describe("https://github.com/neo4j/graphql/issues/288", () => { const companyid1 = generate({ charset: "alphabetic" }); const companyid2 = generate({ charset: "alphabetic" }); - const createMutation = ` + const createMutation = /* GraphQL */ ` mutation { ${USER.operations.create}(input: { USERID: "${userid}", COMPANYID: "${companyid1}" }) { ${USER.plural} { @@ -67,9 +67,9 @@ describe("https://github.com/neo4j/graphql/issues/288", () => { } `; - const updateMutation = ` + const updateMutation = /* GraphQL */ ` mutation { - ${USER.operations.update}(where: { USERID_EQ: "${userid}" }, update: { COMPANYID: "${companyid2}" }) { + ${USER.operations.update}(where: { USERID_EQ: "${userid}" }, update: { COMPANYID_SET: "${companyid2}" }) { ${USER.plural} { USERID COMPANYID diff --git a/packages/graphql/tests/integration/issues/3251.int.test.ts b/packages/graphql/tests/integration/issues/3251.int.test.ts index a95492061e..78155d3ac7 100644 --- a/packages/graphql/tests/integration/issues/3251.int.test.ts +++ b/packages/graphql/tests/integration/issues/3251.int.test.ts @@ -62,7 +62,7 @@ describe("https://github.com/neo4j/graphql/issues/3251", () => { mutation UpdateMovieWithConnectAndUpdate { ${Movie.operations.update}( where: { name_EQ: "TestMovie1" } - update: { name: "TestMovie1", genre: {connect: { where: { node: { name_EQ: "Thriller" } } }} } + update: { name_SET: "TestMovie1", genre: { connect: { where: { node: { name_EQ: "Thriller" } } }} } ) { ${Movie.plural} { name diff --git a/packages/graphql/tests/integration/issues/3355.int.test.ts b/packages/graphql/tests/integration/issues/3355.int.test.ts index 88c5e417a9..a4a91bc98b 100644 --- a/packages/graphql/tests/integration/issues/3355.int.test.ts +++ b/packages/graphql/tests/integration/issues/3355.int.test.ts @@ -66,9 +66,9 @@ describe("https://github.com/neo4j/graphql/issues/3355", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation($id: ID, $name: String) { - ${Movie.operations.update}(where: { id_EQ: $id }, update: {name: $name}) { + ${Movie.operations.update}(where: { id_EQ: $id }, update: { name_SET: $name }) { info { nodesCreated nodesDeleted diff --git a/packages/graphql/tests/integration/issues/3428.int.test.ts b/packages/graphql/tests/integration/issues/3428.int.test.ts index 07cdb2bdd4..005e346b9e 100644 --- a/packages/graphql/tests/integration/issues/3428.int.test.ts +++ b/packages/graphql/tests/integration/issues/3428.int.test.ts @@ -104,7 +104,7 @@ describe("https://github.com/neo4j/graphql/issues/3428", () => { `; updateMutationWithNestedUpdate = `#graphql mutation { - ${Movie.operations.update}(update: { actors: { update: { node: { name: "someName" } } } }) { + ${Movie.operations.update}(update: { actors: { update: { node: { name_SET: "someName" } } } }) { info { nodesCreated nodesDeleted @@ -266,7 +266,7 @@ describe("https://github.com/neo4j/graphql/issues/3428", () => { `; updateMutationWithNestedUpdate = `#graphql mutation { - ${Movie.operations.update}(update: { actors: { ${PersonOne}: { update: { node: { name: "someName" } } } } }) { + ${Movie.operations.update}(update: { actors: { ${PersonOne}: { update: { node: { name_SET: "someName" } } } } }) { info { nodesCreated nodesDeleted diff --git a/packages/graphql/tests/integration/issues/579.int.test.ts b/packages/graphql/tests/integration/issues/579.int.test.ts index f64be2f41a..3e4b8609ec 100644 --- a/packages/graphql/tests/integration/issues/579.int.test.ts +++ b/packages/graphql/tests/integration/issues/579.int.test.ts @@ -69,7 +69,7 @@ describe("https://github.com/neo4j/graphql/pull/579", () => { color: { update: { edge: { - test: true + test_SET: true } } } diff --git a/packages/graphql/tests/integration/issues/894.int.test.ts b/packages/graphql/tests/integration/issues/894.int.test.ts index 051c65359c..1b7fd4f5fa 100644 --- a/packages/graphql/tests/integration/issues/894.int.test.ts +++ b/packages/graphql/tests/integration/issues/894.int.test.ts @@ -80,24 +80,24 @@ describe("https://github.com/neo4j/graphql/issues/894", () => { const orgId = createOrgResult?.data[testOrganization.operations.create][testOrganization.plural][0] .id as string; - const swapSidesQuery = /* GraphQL*/ ` - mutation { - ${testUser.operations.update}( - where: { name_EQ: "Luke Skywalker" } - update: { - activeOrganization: { - connect: { where: { node: { id_EQ: "${orgId}" } } } - disconnect: { where: { node: { NOT: { id_EQ: "${orgId}" } } } } - - } - } - ) { - ${testUser.plural} { - id + const swapSidesQuery = /* GraphQL */ ` + mutation { + ${testUser.operations.update}( + where: { name_EQ: "Luke Skywalker" } + update: { + activeOrganization: { + connect: { where: { node: { id_EQ: "${orgId}" } } } + disconnect: { where: { node: { NOT: { id_EQ: "${orgId}" } } } } + } } + ) { + ${testUser.plural} { + id + } } - `; + } + `; const swapSidesResult = await testHelper.executeGraphQL(swapSidesQuery); expect(swapSidesResult.errors).toBeUndefined(); diff --git a/packages/graphql/tests/integration/issues/only-info.int.test.ts b/packages/graphql/tests/integration/issues/only-info.int.test.ts index dc6db1a1c7..3dcbc56c42 100644 --- a/packages/graphql/tests/integration/issues/only-info.int.test.ts +++ b/packages/graphql/tests/integration/issues/only-info.int.test.ts @@ -56,9 +56,9 @@ describe("https://github.com/neo4j/graphql/issues/567", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation { - ${Movie.operations.update}(where: { id_EQ: "${movieId}" }, update: { title: "${newTitle}" }) { + ${Movie.operations.update}(where: { id_EQ: "${movieId}" }, update: { title_SET: "${newTitle}" }) { info { nodesCreated nodesDeleted diff --git a/packages/graphql/tests/integration/math.int.test.ts b/packages/graphql/tests/integration/math.int.test.ts index 447f3138a5..cd3f5a280a 100644 --- a/packages/graphql/tests/integration/math.int.test.ts +++ b/packages/graphql/tests/integration/math.int.test.ts @@ -43,11 +43,11 @@ describe("Mathematical operations tests", () => { { initialValue: 10.0, value: -5.0, type: "Float", operation: "MULTIPLY", expected: -50.0 }, { initialValue: 10.0, value: 5.0, type: "Float", operation: "DIVIDE", expected: 2.0 }, ])( - "Simple operations on numberical fields: on $type, $operation($initialValue, $value) should return $expected", + "Simple operations on numerical fields: on $type, $operation($initialValue, $value) should return $expected", async ({ initialValue, type, value, operation, expected }) => { const movie = testHelper.createUniqueType("Movie"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${movie.name} @node { id: ID! viewers: ${type}! @@ -60,7 +60,7 @@ describe("Mathematical operations tests", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation($id: ID, $value: ${type}) { ${movie.operations.update}(where: { id_EQ: $id }, update: {viewers_${operation}: $value}) { ${movie.plural} { @@ -120,7 +120,7 @@ describe("Mathematical operations tests", () => { "Should raise an error in case of $expectedError on $type, initialValue: $initialValue, value: $value", async ({ initialValue, type, value, operation, expectedError }) => { const movie = testHelper.createUniqueType("Movie"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${movie.name} @node { id: ID! viewers: ${type}! @@ -133,7 +133,7 @@ describe("Mathematical operations tests", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation($id: ID, $value: ${type}) { ${movie.operations.update}(where: { id_EQ: $id }, update: {viewers_${operation}: $value}) { ${movie.plural} { @@ -177,7 +177,7 @@ describe("Mathematical operations tests", () => { test("Should raise an error if the input fields are ambiguous", async () => { const initialViewers = int(100); const movie = testHelper.createUniqueType("Movie"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${movie.name} @node { id: ID! viewers: Int! @@ -190,9 +190,9 @@ describe("Mathematical operations tests", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation($id: ID, $value: Int) { - ${movie.operations.update}(where: { id_EQ: $id }, update: {viewers: $value, viewers_INCREMENT: $value}) { + ${movie.operations.update}(where: { id_EQ: $id }, update: {viewers_SET: $value, viewers_INCREMENT: $value}) { ${movie.plural} { id viewers @@ -215,9 +215,11 @@ describe("Mathematical operations tests", () => { const gqlResult = await testHelper.executeGraphQL(query, { variableValues: { id, value: 10 }, }); + expect(gqlResult.errors).toEqual([ - new GraphQLError(`Conflicting modification of [[viewers]], [[viewers_INCREMENT]] on type ${movie}`), + new GraphQLError(`Conflicting modification of [[viewers_SET]], [[viewers_INCREMENT]] on type ${movie}`), ]); + const storedValue = await testHelper.executeCypher( ` MATCH (n:${movie.name} {id: $id}) RETURN n.viewers AS viewers @@ -233,7 +235,7 @@ describe("Mathematical operations tests", () => { const initialViewers = int(100); const initialLength = int(100); const movie = testHelper.createUniqueType("Movie"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${movie.name} @node { id: ID! viewers: Int! @@ -247,7 +249,7 @@ describe("Mathematical operations tests", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation($id: ID, $value: Int) { ${movie.operations.update}(where: { id_EQ: $id }, update: {length_DECREMENT: $value, viewers_INCREMENT: $value}) { ${movie.plural} { @@ -293,7 +295,7 @@ describe("Mathematical operations tests", () => { const name = "Luigino"; const movie = testHelper.createUniqueType("Movie"); const actor = testHelper.createUniqueType("Actor"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${movie.name} @node { viewers: Int! workers: [${actor.name}!]! @relationship(type: "WORKED_IN", direction: IN) @@ -311,7 +313,7 @@ describe("Mathematical operations tests", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation($id: ID, $value: Int) { ${actor.operations.update}(where: { id_EQ: $id }, update: { @@ -372,7 +374,7 @@ describe("Mathematical operations tests", () => { const production = testHelper.createUniqueType("Production"); const actor = testHelper.createUniqueType("Actor"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` interface ${production.name} { viewers: Int! } @@ -393,7 +395,7 @@ describe("Mathematical operations tests", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation($id: ID, $value: Int) { ${actor.operations.update}(where: { id_EQ: $id }, update: { @@ -450,7 +452,7 @@ describe("Mathematical operations tests", () => { test("Should throws an error if the property holds Nan values", async () => { const increment = 10; const movie = testHelper.createUniqueType("Movie"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${movie.name} @node { id: ID! viewers: Int @@ -463,7 +465,7 @@ describe("Mathematical operations tests", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation($id: ID, $value: Int) { ${movie.operations.update}(where: { id_EQ: $id }, update: {viewers_INCREMENT: $value}) { ${movie.plural} { @@ -510,7 +512,7 @@ describe("Mathematical operations tests", () => { const payIncrement = 50; const movie = testHelper.createUniqueType("Movie"); const actor = testHelper.createUniqueType("Actor"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${movie.name} @node { title: String actors: [${actor.name}!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) @@ -533,7 +535,7 @@ describe("Mathematical operations tests", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation Mutation($id: ID, $payIncrement: Float) { ${actor.operations.update}(where: { id_EQ: $id }, update: { actedIn: [ @@ -595,7 +597,7 @@ describe("Mathematical operations tests", () => { const payIncrement = 50; const movie = testHelper.createUniqueType("Movie"); const actor = testHelper.createUniqueType("Actor"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${movie.name} @node { title: String viewers: Int @@ -619,7 +621,7 @@ describe("Mathematical operations tests", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation Mutation($id: ID, $payIncrement: Float) { ${actor.operations.update}(where: { id_EQ: $id }, update: { actedIn: [ @@ -627,7 +629,7 @@ describe("Mathematical operations tests", () => { update: { edge: { pay_ADD: $payIncrement - pay: $payIncrement + pay_SET: $payIncrement } } } @@ -667,11 +669,11 @@ describe("Mathematical operations tests", () => { }); expect(gqlResult.errors).toBeDefined(); - expect( - (gqlResult.errors as GraphQLError[]).some((el) => - el.message.includes("Cannot mutate the same field multiple times in one Mutation") - ) - ).toBeTruthy(); + + const relationshipType = `${movie.name}ActorsRelationship`; + expect(gqlResult.errors).toEqual([ + new GraphQLError(`Conflicting modification of [[pay_SET]], [[pay_ADD]] on type ${relationshipType}`), + ]); const storedValue = await testHelper.executeCypher( ` MATCH(b: ${actor.name}{id: $id}) -[c: ACTED_IN]-> (a: ${movie.name}) RETURN c.pay as pay diff --git a/packages/graphql/tests/integration/relationship-properties/update.int.test.ts b/packages/graphql/tests/integration/relationship-properties/update.int.test.ts index f853a27c4e..7b8f512f1b 100644 --- a/packages/graphql/tests/integration/relationship-properties/update.int.test.ts +++ b/packages/graphql/tests/integration/relationship-properties/update.int.test.ts @@ -72,7 +72,7 @@ describe("Relationship properties - update", () => { mutation { ${Movie.operations.update}( where: { title_EQ: "${movieTitle}" } - update: { actors: [{ where: { node: { name_EQ: "${actor1}" } }, update: { edge: { screenTime: 60 } } }] } + update: { actors: [{ where: { node: { name_EQ: "${actor1}" } }, update: { edge: { screenTime_SET: 60 } } }] } ) { ${Movie.plural} { title @@ -127,8 +127,8 @@ describe("Relationship properties - update", () => { { where: { node: { name_EQ: "${actor2}" } } update: { - edge: { screenTime: 60 } - node: { name: "${actor3}" } + edge: { screenTime_SET: 60 } + node: { name_SET: "${actor3}" } } } ] diff --git a/packages/graphql/tests/integration/rfcs/rfc-003.int.test.ts b/packages/graphql/tests/integration/rfcs/rfc-003.int.test.ts index 31d160e988..7c9018d54d 100644 --- a/packages/graphql/tests/integration/rfcs/rfc-003.int.test.ts +++ b/packages/graphql/tests/integration/rfcs/rfc-003.int.test.ts @@ -140,9 +140,9 @@ describe("integration/rfc/003", () => { charset: "alphabetic", }); - const mutation = ` + const mutation = /* GraphQL */ ` mutation { - ${Movie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id: "${movieId}" }) { + ${Movie.operations.update}(where: { id_EQ: "${movieId}" }, update: { id_SET: "${movieId}" }) { info { nodesCreated } @@ -188,11 +188,11 @@ describe("integration/rfc/003", () => { charset: "alphabetic", }); - const mutation = ` + const mutation = /* GraphQL */ ` mutation { ${Movie.operations.update}( where: { id_EQ: "${movieId}" } - update: { director: { update: { node: { id: "${directorId}" } } } } + update: { director: { update: { node: { id_SET: "${directorId}" } } } } ) { info { nodesCreated @@ -238,7 +238,7 @@ describe("integration/rfc/003", () => { charset: "alphabetic", }); - const mutation = ` + const mutation = /* GraphQL */ ` mutation { ${Movie.operations.update}( where: { id_EQ: "${movieId}" } diff --git a/packages/graphql/tests/integration/subscriptions/auth/allow.int.test.ts b/packages/graphql/tests/integration/subscriptions/auth/allow.int.test.ts index 950fdd3642..4ceb1b90f1 100644 --- a/packages/graphql/tests/integration/subscriptions/auth/allow.int.test.ts +++ b/packages/graphql/tests/integration/subscriptions/auth/allow.int.test.ts @@ -488,9 +488,9 @@ describe("auth/allow", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation { - ${userType.operations.update}(where: {id_EQ: "${userId}"}, update: {id: "new-id"}) { + ${userType.operations.update}(where: {id_EQ: "${userId}"}, update: { id_SET: "new-id" }) { ${userType.plural} { id } @@ -539,9 +539,9 @@ describe("auth/allow", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation { - ${userType.operations.update}(where: {id_EQ: "${userId}"}, update: {password: "new-password"}) { + ${userType.operations.update}(where: {id_EQ: "${userId}"}, update: { password_SET: "new-password" }) { ${userType.plural} { id } @@ -597,11 +597,11 @@ describe("auth/allow", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation { ${postType.operations.update}( where: { id_EQ: "${postId}" } - update: { creator: { update: { node: { id: "new-id" } } } } + update: { creator: { update: { node: { id_SET: "new-id" } } } } ) { ${postType.plural} { id @@ -660,11 +660,11 @@ describe("auth/allow", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation { ${postType.operations.update}( where: { id_EQ: "${postId}" } - update: { creator: { update: { node: { password: "new-password" } } } } + update: { creator: { update: { node: { password_SET: "new-password" } } } } ) { ${postType.plural} { id @@ -841,7 +841,7 @@ describe("auth/allow", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation { ${userType.operations.update}( where: { id_EQ: "${userId}" } @@ -1061,7 +1061,7 @@ describe("auth/allow", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation { ${commentType.operations.update}( where: { id_EQ: "${commentId}" } diff --git a/packages/graphql/tests/integration/subscriptions/update/top-level-where.int.test.ts b/packages/graphql/tests/integration/subscriptions/update/top-level-where.int.test.ts index 6b8d1c8e68..f56937d2e1 100644 --- a/packages/graphql/tests/integration/subscriptions/update/top-level-where.int.test.ts +++ b/packages/graphql/tests/integration/subscriptions/update/top-level-where.int.test.ts @@ -100,7 +100,7 @@ describe("Delete using top level aggregate where - subscriptions enabled", () => } } } - update: { content: "${updatedContent}" } + update: { content_SET: "${updatedContent}" } ) { ${postType.plural} { id diff --git a/packages/graphql/tests/integration/types/date.int.test.ts b/packages/graphql/tests/integration/types/date.int.test.ts index a541cdf2c9..48f357ae64 100644 --- a/packages/graphql/tests/integration/types/date.int.test.ts +++ b/packages/graphql/tests/integration/types/date.int.test.ts @@ -187,7 +187,9 @@ describe("Date", () => { const create = /* GraphQL */ ` mutation { - ${Movie.operations.update}(where: { id_EQ: "${id}"}, update: {date: "${date.toISOString()}"}) { + ${ + Movie.operations.update + }(where: { id_EQ: "${id}"}, update: { date_SET: "${date.toISOString()}" }) { ${Movie.plural} { id date diff --git a/packages/graphql/tests/integration/types/datetime.int.test.ts b/packages/graphql/tests/integration/types/datetime.int.test.ts index d9960cc157..fb9ef99f0d 100644 --- a/packages/graphql/tests/integration/types/datetime.int.test.ts +++ b/packages/graphql/tests/integration/types/datetime.int.test.ts @@ -217,7 +217,9 @@ describe("DateTime", () => { const create = /* GraphQL */ ` mutation { - ${Movie.operations.update}(where: {id_EQ: "${id}"}, update: {datetime: "${date.toISOString()}"}) { + ${ + Movie.operations.update + }(where: {id_EQ: "${id}"}, update: { datetime_SET: "${date.toISOString()}" }) { ${Movie.plural} { id datetime diff --git a/packages/graphql/tests/integration/types/duration.int.test.ts b/packages/graphql/tests/integration/types/duration.int.test.ts index 6e0679fef9..c386887771 100644 --- a/packages/graphql/tests/integration/types/duration.int.test.ts +++ b/packages/graphql/tests/integration/types/duration.int.test.ts @@ -189,7 +189,7 @@ describe("Duration", () => { const mutation = /* GraphQL */ ` mutation ($id: ID!, $duration: Duration) { - ${Movie.operations.update}(where: { id_EQ: $id }, update: { duration: $duration }) { + ${Movie.operations.update}(where: { id_EQ: $id }, update: { duration_SET: $duration }) { ${Movie.plural} { id duration diff --git a/packages/graphql/tests/integration/types/localdatetime.int.test.ts b/packages/graphql/tests/integration/types/localdatetime.int.test.ts index 9353a7203d..ac408a71a3 100644 --- a/packages/graphql/tests/integration/types/localdatetime.int.test.ts +++ b/packages/graphql/tests/integration/types/localdatetime.int.test.ts @@ -168,7 +168,7 @@ describe("LocalDateTime", () => { const mutation = /* GraphQL */ ` mutation ($id: ID!, $localDT: LocalDateTime) { - ${Movie.operations.update}(where: { id_EQ: $id }, update: { localDT: $localDT }) { + ${Movie.operations.update}(where: { id_EQ: $id }, update: { localDT_SET: $localDT }) { ${Movie.plural} { id localDT diff --git a/packages/graphql/tests/integration/types/localtime.int.test.ts b/packages/graphql/tests/integration/types/localtime.int.test.ts index 48ed278b1c..b89a58f17f 100644 --- a/packages/graphql/tests/integration/types/localtime.int.test.ts +++ b/packages/graphql/tests/integration/types/localtime.int.test.ts @@ -166,7 +166,7 @@ describe("LocalTime", () => { const mutation = /* GraphQL */ ` mutation ($id: ID!, $time: LocalTime) { - ${Movie.operations.update}(where: { id_EQ: $id }, update: { time: $time }) { + ${Movie.operations.update}(where: { id_EQ: $id }, update: { time_SET: $time }) { ${Movie.plural} { id time diff --git a/packages/graphql/tests/integration/types/point-cartesian.int.test.ts b/packages/graphql/tests/integration/types/point-cartesian.int.test.ts index c3c4c65389..5814de30ba 100644 --- a/packages/graphql/tests/integration/types/point-cartesian.int.test.ts +++ b/packages/graphql/tests/integration/types/point-cartesian.int.test.ts @@ -155,7 +155,7 @@ describe("CartesianPoint", () => { const update = /* GraphQL */ ` mutation UpdateParts($serial: String!, $x: Float!, $y: Float!) { - ${Part.operations.update}(where: { serial_EQ: $serial }, update: { location: { x: $x, y: $y } }) { + ${Part.operations.update}(where: { serial_EQ: $serial }, update: { location_SET: { x: $x, y: $y } }) { ${Part.plural} { serial location { @@ -218,7 +218,7 @@ describe("CartesianPoint", () => { const update = /* GraphQL */ ` mutation UpdateParts($serial: String!, $x: Float!, $y: Float!, $z: Float!) { - ${Part.operations.update}(where: { serial_EQ: $serial }, update: { location: { x: $x, y: $y, z: $z } }) { + ${Part.operations.update}(where: { serial_EQ: $serial }, update: { location_SET: { x: $x, y: $y, z: $z } }) { ${Part.plural} { serial location { diff --git a/packages/graphql/tests/integration/types/point.int.test.ts b/packages/graphql/tests/integration/types/point.int.test.ts index 76fdf76355..16dec61048 100644 --- a/packages/graphql/tests/integration/types/point.int.test.ts +++ b/packages/graphql/tests/integration/types/point.int.test.ts @@ -190,11 +190,11 @@ describe("Point", () => { expect((beforeResult.records[0] as any).toObject().p.location.x).toEqual(longitude); expect((beforeResult.records[0] as any).toObject().p.location.y).toEqual(latitude); - const update = ` + const update = /* GraphQL */ ` mutation UpdatePhotographs($id: String!, $longitude: Float!, $latitude: Float!) { ${Photograph.operations.update}( where: { id_EQ: $id } - update: { location: { longitude: $longitude, latitude: $latitude } } + update: { location_SET: { longitude: $longitude, latitude: $latitude } } ) { ${Photograph.plural} { id @@ -263,7 +263,7 @@ describe("Point", () => { mutation UpdatePhotographs($id: String!, $longitude: Float!, $latitude: Float!, $height: Float!) { ${Photograph.operations.update}( where: { id_EQ: $id } - update: { location: { longitude: $longitude, latitude: $latitude, height: $height } } + update: { location_SET: { longitude: $longitude, latitude: $latitude, height: $height } } ) { ${Photograph.plural} { id diff --git a/packages/graphql/tests/integration/types/points-cartesian.int.test.ts b/packages/graphql/tests/integration/types/points-cartesian.int.test.ts index d540ecd373..b33157d50c 100644 --- a/packages/graphql/tests/integration/types/points-cartesian.int.test.ts +++ b/packages/graphql/tests/integration/types/points-cartesian.int.test.ts @@ -181,7 +181,7 @@ describe("[CartesianPoint]", () => { const update = /* GraphQL */ ` mutation UpdateParts($id: String!, $locations: [CartesianPointInput!]) { - ${Part.operations.update}(where: { id_EQ: $id }, update: { locations: $locations }) { + ${Part.operations.update}(where: { id_EQ: $id }, update: { locations_SET: $locations }) { ${Part.plural} { id locations { @@ -264,7 +264,7 @@ describe("[CartesianPoint]", () => { const update = /* GraphQL */ ` mutation UpdateParts($id: String!, $locations: [CartesianPointInput!]) { - ${Part.operations.update}(where: { id_EQ: $id }, update: { locations: $locations }) { + ${Part.operations.update}(where: { id_EQ: $id }, update: { locations_SET: $locations }) { ${Part.plural} { id locations { diff --git a/packages/graphql/tests/integration/types/points.int.test.ts b/packages/graphql/tests/integration/types/points.int.test.ts index fc3daefb79..b95d1502ae 100644 --- a/packages/graphql/tests/integration/types/points.int.test.ts +++ b/packages/graphql/tests/integration/types/points.int.test.ts @@ -181,9 +181,9 @@ describe("[Point]", () => { .sort() ).toEqual(waypoints.sort()); - const update = ` + const update = /* GraphQL */ ` mutation UpdateRoutes($id: String!, $waypoints: [PointInput!]) { - ${Route.operations.update}(where: { id_EQ: $id }, update: { waypoints: $waypoints }) { + ${Route.operations.update}(where: { id_EQ: $id }, update: { waypoints_SET: $waypoints }) { ${Route.plural} { id waypoints { @@ -265,9 +265,9 @@ describe("[Point]", () => { .sort() ).toEqual(waypoints.sort()); - const update = ` + const update = /* GraphQL */ ` mutation UpdateRoutes($id: String!, $waypoints: [PointInput!]) { - ${Route.operations.update}(where: { id_EQ: $id }, update: { waypoints: $waypoints }) { + ${Route.operations.update}(where: { id_EQ: $id }, update: { waypoints_SET: $waypoints }) { ${Route.plural} { id waypoints { diff --git a/packages/graphql/tests/integration/types/time.int.test.ts b/packages/graphql/tests/integration/types/time.int.test.ts index 6faeede829..c7bf472332 100644 --- a/packages/graphql/tests/integration/types/time.int.test.ts +++ b/packages/graphql/tests/integration/types/time.int.test.ts @@ -177,9 +177,9 @@ describe("Time", () => { { movie: { id } } ); - const mutation = ` + const mutation = /* GraphQL */ ` mutation ($id: ID!, $time: Time) { - ${Movie.operations.update}(where: { id_EQ: $id }, update: { time: $time }) { + ${Movie.operations.update}(where: { id_EQ: $id }, update: { time_SET: $time }) { ${Movie.plural} { id time diff --git a/packages/graphql/tests/integration/unions/union-relationship-filtering.int.test.ts b/packages/graphql/tests/integration/unions/union-relationship-filtering.int.test.ts index 362dcba384..1363806eb6 100644 --- a/packages/graphql/tests/integration/unions/union-relationship-filtering.int.test.ts +++ b/packages/graphql/tests/integration/unions/union-relationship-filtering.int.test.ts @@ -151,7 +151,7 @@ describe("Union filtering", () => { mutation updateName($name: String!) { ${Actor.operations.update}( where: { actedIn_SOME: { ${Movie}: { title_EQ: "The Office" } }}, - update: { name: $name } + update: { name_SET: $name } ) { ${Actor.plural} { name diff --git a/packages/graphql/tests/integration/unions/unions.int.test.ts b/packages/graphql/tests/integration/unions/unions.int.test.ts index e8b76955e5..4605ade715 100644 --- a/packages/graphql/tests/integration/unions/unions.int.test.ts +++ b/packages/graphql/tests/integration/unions/unions.int.test.ts @@ -481,7 +481,7 @@ describe("unions", () => { }); test("should update a union", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` union Search = ${MovieType} | ${GenreType} type ${GenreType} @node { @@ -511,7 +511,7 @@ describe("unions", () => { charset: "alphabetic", }); - const mutation = ` + const mutation = /* GraphQL */ ` mutation { ${MovieType.operations.update}( where: { title_EQ: "${movieTitle}" }, @@ -520,7 +520,7 @@ describe("unions", () => { ${GenreType}: { where: { node: { name_EQ: "${genreName}" } }, update: { - node: { name: "${newGenreName}" } + node: { name_SET: "${newGenreName}" } } } } @@ -600,13 +600,13 @@ describe("unions", () => { ${GenreType}: { where: { node: { name_EQ: "${genreName}" } }, update: { - node: { name: "${newGenreName}" } + node: { name_SET: "${newGenreName}" } } } ${MovieType}: { where: { node: { title_EQ: "${nestedMovieTitle}" } }, update: { - node: { title: "${newNestedMovieTitle}" } + node: { title_SET: "${newNestedMovieTitle}" } } } } diff --git a/packages/graphql/tests/integration/update.int.test.ts b/packages/graphql/tests/integration/update.int.test.ts index b27895a630..904ba14319 100644 --- a/packages/graphql/tests/integration/update.int.test.ts +++ b/packages/graphql/tests/integration/update.int.test.ts @@ -17,12 +17,11 @@ * limitations under the License. */ -import { gql } from "graphql-tag"; import { generate } from "randomstring"; import type { UniqueType } from "../utils/graphql-types"; import { TestHelper } from "../utils/tests-helper"; -describe("update", () => { +describe("update (deprecate implicit _SET)", () => { const testHelper = new TestHelper(); let Movie: UniqueType; let Actor: UniqueType; @@ -47,7 +46,7 @@ describe("update", () => { }); test("should update no movies where predicate yields false", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${Movie} @node { id: ID! name: String @@ -64,9 +63,9 @@ describe("update", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation($id: ID, $name: String) { - ${Movie.operations.update}(where: { id_EQ: $id }, update: {name: $name}) { + ${Movie.operations.update}(where: { id_EQ: $id }, update: { name_SET: $name }) { ${Movie.plural} { id name @@ -85,7 +84,7 @@ describe("update", () => { }); test("should update a single movie", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${Movie} @node { id: ID! name: String @@ -106,9 +105,9 @@ describe("update", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation($id: ID, $name: String) { - ${Movie.operations.update}(where: { id_EQ: $id }, update: {name: $name}) { + ${Movie.operations.update}(where: { id_EQ: $id }, update: {name_SET: $name}) { ${Movie.plural} { id name @@ -136,7 +135,7 @@ describe("update", () => { expect(gqlResult?.data?.[Movie.operations.update]).toEqual({ [Movie.plural]: [{ id, name: updatedName }] }); }); test("should connect through interface relationship", async () => { - const typeDefs = gql` + const typeDefs = /* GraphQL */ ` type ${Movie} implements Production @subscription(events: []) @node { title: String! id: ID @@ -169,7 +168,7 @@ describe("update", () => { await testHelper.initNeo4jGraphQL({ typeDefs, }); - const query = ` + const query = /* GraphQL */ ` mutation { ${Movie.operations.update}( where: { id_EQ: "1" }, @@ -226,7 +225,7 @@ describe("update", () => { }); test("should update a movie when matching on relationship property", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${Actor} @node { name: String movies: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) @@ -252,12 +251,12 @@ describe("update", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation($updatedMovieId: ID, $actorName: String) { ${Movie.operations.update}( where: { actorsConnection_SOME: { node: { name_EQ: $actorName } } }, update: { - id: $updatedMovieId + id_SET: $updatedMovieId } ) { ${Movie.plural} { @@ -292,7 +291,7 @@ describe("update", () => { }); test("should update 2 movies", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${Movie} @node { id: ID! name: String @@ -311,9 +310,9 @@ describe("update", () => { const updatedName = "Beer"; - const query = ` + const query = /* GraphQL */ ` mutation($id1: ID, $id2: ID, $name: String) { - ${Movie.operations.update}(where: { OR: [{ id_EQ: $id1 }, { id_EQ: $id2 }] }, update: {name: $name}) { + ${Movie.operations.update}(where: { OR: [{ id_EQ: $id1 }, { id_EQ: $id2 }] }, update: {name_SET: $name}) { ${Movie.plural} { id name @@ -339,16 +338,16 @@ describe("update", () => { expect(gqlResult.errors).toBeFalsy(); - expect((gqlResult?.data as any)?.[Movie.operations.update][Movie.plural] as any[]).toHaveLength(2); + expect(gqlResult?.data?.[Movie.operations.update]?.[Movie.plural] as any[]).toHaveLength(2); - ((gqlResult?.data as any)?.[Movie.operations.update][Movie.plural] as any[]).forEach((movie) => { + (gqlResult?.data?.[Movie.operations.update]?.[Movie.plural] as any[]).forEach((movie) => { expect([id1, id2]).toContain(movie.id); expect(movie.name).toEqual(updatedName); }); }); test("should update nested actors from a movie", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${Actor} @node { name: String movies: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) @@ -374,14 +373,14 @@ describe("update", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation($movieId: ID, $initialName: String, $updatedName: String) { ${Movie.operations.update}( where: { id_EQ: $movieId }, update: { actors: [{ where: { node: { name_EQ: $initialName } }, - update: { node: { name: $updatedName } } + update: { node: { name_SET: $updatedName } } }] } ) { @@ -419,7 +418,7 @@ describe("update", () => { }); test("should delete a nested actor from a movie abc", async () => { - const typeDefs = gql` + const typeDefs = /* GraphQL */ ` type ${Actor} @node { name: String movies: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) @@ -484,7 +483,7 @@ describe("update", () => { }); test("should delete a nested actor from a movie within an update block", async () => { - const typeDefs = gql` + const typeDefs = /* GraphQL */ ` type ${Actor} @node { name: String movies: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) @@ -549,7 +548,7 @@ describe("update", () => { }); test("should delete a nested actor and one of their nested movies, within an update block abc", async () => { - const typeDefs = gql` + const typeDefs = /* GraphQL */ ` type ${Actor} @node { name: String movies: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) @@ -641,7 +640,7 @@ describe("update", () => { }); test("should delete multiple nested actors from a movie", async () => { - const typeDefs = gql` + const typeDefs = /* GraphQL */ ` type ${Actor} @node { name: String movies: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) @@ -717,7 +716,7 @@ describe("update", () => { }); test("should update nested actors from a move then update the movie from the nested actors", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${Actor} @node { name: String movies: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) @@ -736,7 +735,7 @@ describe("update", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation { ${Movie.operations.update}( where: { id_EQ: "${movieId}" } @@ -745,10 +744,10 @@ describe("update", () => { where: { node: { name_EQ: "old actor name" } } update: { node: { - name: "new actor name" + name_SET: "new actor name" movies: [{ where: { node: { title_EQ: "old movie title" } } - update: { node: { title: "new movie title" } } + update: { node: { title_SET: "new movie title" } } }] } } @@ -785,7 +784,7 @@ describe("update", () => { }); test("should connect a single movie to a actor", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${Actor} @node { id: ID movies: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) @@ -807,7 +806,7 @@ describe("update", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation { ${Movie.operations.update}(where: { id_EQ: "${movieId}" }, update: {actors: { connect: [{ where: { node:{ id_EQ: "${actorId}"}}}]}}) { ${Movie.plural} { @@ -841,7 +840,7 @@ describe("update", () => { }); test("should connect a single movie to a actor based on a connection predicate", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${Actor} @node { id: ID movies: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) @@ -873,7 +872,7 @@ describe("update", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation($movieId: ID, $seriesId: ID) { ${Movie.operations.update}( where: { id_EQ: $movieId } @@ -913,7 +912,7 @@ describe("update", () => { }); test("should disconnect an actor from a movie", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${Actor} @node { id: ID movies: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) @@ -938,7 +937,7 @@ describe("update", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation { ${Movie.operations.update}(where: { id_EQ: "${movieId}" }, update: {actors: { disconnect: [{where: { node: { id_EQ: "${actorId1}"}}}]}}) { ${Movie.plural} { @@ -976,7 +975,7 @@ describe("update", () => { }); test("should disconnect a color from a photo through a product", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${Product} @node { id: ID photos: [${Photo}!]! @relationship(type: "HAS_PHOTO", direction: OUT) @@ -1006,7 +1005,7 @@ describe("update", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation { ${Product.operations.update}( where: { id_EQ: "${productId}" } @@ -1059,7 +1058,7 @@ describe("update", () => { }); test("should update the colors of a product to light versions", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${Product} @node { id: ID name: String @@ -1109,7 +1108,7 @@ describe("update", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation { ${Product.operations.update}( where: { id_EQ: "${productId}" } @@ -1119,7 +1118,7 @@ describe("update", () => { where: { node: { name_EQ: "Green Photo", id_EQ: "${photo0Id}" } } update: { node: { - name: "Light Green Photo" + name_SET: "Light Green Photo" color: { connect: { where: { node: { name_EQ: "Light Green", id_EQ: "${photo0Color1Id}" } } } disconnect: { where: { node: { name_EQ: "Green", id_EQ: "${photo0Color0Id}" } } } @@ -1131,7 +1130,7 @@ describe("update", () => { where: { node: { name_EQ: "Yellow Photo", id_EQ: "${photo1Id}" } } update: { node: { - name: "Light Yellow Photo" + name_SET: "Light Yellow Photo" color: { connect: { where: { node: { name_EQ: "Light Yellow", id_EQ: "${photo1Color1Id}" } } } disconnect: { where: { node: { name_EQ: "Yellow", id_EQ: "${photo1Color0Id}" } } } @@ -1188,9 +1187,9 @@ describe("update", () => { expect(gqlResult.errors).toBeFalsy(); - expect((gqlResult?.data as any)?.[Product.operations.update][Product.plural] as any[]).toHaveLength(1); + expect(gqlResult?.data?.[Product.operations.update]?.[Product.plural] as any[]).toHaveLength(1); - const { photos } = ((gqlResult?.data as any)?.[Product.operations.update][Product.plural] as any[])[0]; + const { photos } = (gqlResult?.data?.[Product.operations.update]?.[Product.plural] as any[])[0]; const greenPhoto = photos.find((x) => x.id === photo0Id); @@ -1210,7 +1209,7 @@ describe("update", () => { }); test("should update a Product via creating a new Photo and creating a new Color (via field level update)", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${Product} @node { id: ID name: String @@ -1244,7 +1243,7 @@ describe("update", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation { ${Product.operations.update}( where: { id_EQ: "${productId}" } @@ -1295,14 +1294,14 @@ describe("update", () => { expect(gqlResult.errors).toBeFalsy(); - expect(((gqlResult?.data as any)?.[Product.operations.update][Product.plural] as any[])[0]).toMatchObject({ + expect((gqlResult?.data?.[Product.operations.update]?.[Product.plural] as any[])[0]).toMatchObject({ id: productId, photos: [{ id: photoId, name: "Green Photo", color: { id: colorId, name: "Green" } }], }); }); test("should update a Product via creating a new Photo and creating a new Color (via top level create)", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${Product} @node { id: ID name: String @@ -1336,7 +1335,7 @@ describe("update", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation { ${Product.operations.update}( where: { id_EQ: "${productId}" } @@ -1385,7 +1384,7 @@ describe("update", () => { expect(gqlResult.errors).toBeFalsy(); - expect(((gqlResult?.data as any)?.[Product.operations.update][Product.plural] as any[])[0]).toMatchObject({ + expect((gqlResult?.data?.[Product.operations.update]?.[Product.plural] as any[])[0]).toMatchObject({ id: productId, photos: [{ id: photoId, name: "Green Photo", color: { id: colorId, name: "Green" } }], }); diff --git a/packages/graphql/tests/schema/aggregations.test.ts b/packages/graphql/tests/schema/aggregations.test.ts index 8e434ad6f5..6c43f43962 100644 --- a/packages/graphql/tests/schema/aggregations.test.ts +++ b/packages/graphql/tests/schema/aggregations.test.ts @@ -209,25 +209,36 @@ describe("Aggregations", () => { } input MovieUpdateInput { - createdAt: DateTime - id: ID - imdbRating: Float + createdAt: DateTime @deprecated(reason: \\"Please use the explicit _SET field\\") + createdAt_SET: DateTime + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + imdbRating: Float @deprecated(reason: \\"Please use the explicit _SET field\\") imdbRating_ADD: Float imdbRating_DIVIDE: Float imdbRating_MULTIPLY: Float + imdbRating_SET: Float imdbRating_SUBTRACT: Float - isbn: String - screenTime: Duration - someBigInt: BigInt + isbn: String @deprecated(reason: \\"Please use the explicit _SET field\\") + isbn_SET: String + screenTime: Duration @deprecated(reason: \\"Please use the explicit _SET field\\") + screenTime_SET: Duration + someBigInt: BigInt @deprecated(reason: \\"Please use the explicit _SET field\\") someBigInt_DECREMENT: BigInt someBigInt_INCREMENT: BigInt - someInt: Int + someBigInt_SET: BigInt + someInt: Int @deprecated(reason: \\"Please use the explicit _SET field\\") someInt_DECREMENT: Int someInt_INCREMENT: Int - someLocalDateTime: LocalDateTime - someLocalTime: LocalTime - someTime: Time - title: String + someInt_SET: Int + someLocalDateTime: LocalDateTime @deprecated(reason: \\"Please use the explicit _SET field\\") + someLocalDateTime_SET: LocalDateTime + someLocalTime: LocalTime @deprecated(reason: \\"Please use the explicit _SET field\\") + someLocalTime_SET: LocalTime + someTime: Time @deprecated(reason: \\"Please use the explicit _SET field\\") + someTime_SET: Time + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -679,24 +690,34 @@ describe("Aggregations", () => { } input LikesUpdateInput { - someBigInt: BigInt + someBigInt: BigInt @deprecated(reason: \\"Please use the explicit _SET field\\") someBigInt_DECREMENT: BigInt someBigInt_INCREMENT: BigInt - someDateTime: DateTime - someDuration: Duration - someFloat: Float + someBigInt_SET: BigInt + someDateTime: DateTime @deprecated(reason: \\"Please use the explicit _SET field\\") + someDateTime_SET: DateTime + someDuration: Duration @deprecated(reason: \\"Please use the explicit _SET field\\") + someDuration_SET: Duration + someFloat: Float @deprecated(reason: \\"Please use the explicit _SET field\\") someFloat_ADD: Float someFloat_DIVIDE: Float someFloat_MULTIPLY: Float + someFloat_SET: Float someFloat_SUBTRACT: Float - someId: ID - someInt: Int + someId: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + someId_SET: ID + someInt: Int @deprecated(reason: \\"Please use the explicit _SET field\\") someInt_DECREMENT: Int someInt_INCREMENT: Int - someLocalDateTime: LocalDateTime - someLocalTime: LocalTime - someString: String - someTime: Time + someInt_SET: Int + someLocalDateTime: LocalDateTime @deprecated(reason: \\"Please use the explicit _SET field\\") + someLocalDateTime_SET: LocalDateTime + someLocalTime: LocalTime @deprecated(reason: \\"Please use the explicit _SET field\\") + someLocalTime_SET: LocalTime + someString: String @deprecated(reason: \\"Please use the explicit _SET field\\") + someString_SET: String + someTime: Time @deprecated(reason: \\"Please use the explicit _SET field\\") + someTime_SET: Time } input LikesWhere { @@ -1074,7 +1095,8 @@ describe("Aggregations", () => { input PostUpdateInput { likes: [PostLikesUpdateFieldInput!] - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } type PostUserLikesAggregationSelection { @@ -1277,24 +1299,34 @@ describe("Aggregations", () => { } input UserUpdateInput { - someBigInt: BigInt + someBigInt: BigInt @deprecated(reason: \\"Please use the explicit _SET field\\") someBigInt_DECREMENT: BigInt someBigInt_INCREMENT: BigInt - someDateTime: DateTime - someDuration: Duration - someFloat: Float + someBigInt_SET: BigInt + someDateTime: DateTime @deprecated(reason: \\"Please use the explicit _SET field\\") + someDateTime_SET: DateTime + someDuration: Duration @deprecated(reason: \\"Please use the explicit _SET field\\") + someDuration_SET: Duration + someFloat: Float @deprecated(reason: \\"Please use the explicit _SET field\\") someFloat_ADD: Float someFloat_DIVIDE: Float someFloat_MULTIPLY: Float + someFloat_SET: Float someFloat_SUBTRACT: Float - someId: ID - someInt: Int + someId: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + someId_SET: ID + someInt: Int @deprecated(reason: \\"Please use the explicit _SET field\\") someInt_DECREMENT: Int someInt_INCREMENT: Int - someLocalDateTime: LocalDateTime - someLocalTime: LocalTime - someString: String - someTime: Time + someInt_SET: Int + someLocalDateTime: LocalDateTime @deprecated(reason: \\"Please use the explicit _SET field\\") + someLocalDateTime_SET: LocalDateTime + someLocalTime: LocalTime @deprecated(reason: \\"Please use the explicit _SET field\\") + someLocalTime_SET: LocalTime + someString: String @deprecated(reason: \\"Please use the explicit _SET field\\") + someString_SET: String + someTime: Time @deprecated(reason: \\"Please use the explicit _SET field\\") + someTime_SET: Time } input UserWhere { diff --git a/packages/graphql/tests/schema/array-methods.test.ts b/packages/graphql/tests/schema/array-methods.test.ts index 8e0e9df2fb..e38dec8df7 100644 --- a/packages/graphql/tests/schema/array-methods.test.ts +++ b/packages/graphql/tests/schema/array-methods.test.ts @@ -68,9 +68,10 @@ describe("Arrays Methods", () => { } input ActedInUpdateInput { - pay: [Float] + pay: [Float] @deprecated(reason: \\"Please use the explicit _SET field\\") pay_POP: Int pay_PUSH: [Float] + pay_SET: [Float] } input ActedInWhere { @@ -262,7 +263,8 @@ describe("Arrays Methods", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -516,15 +518,18 @@ describe("Arrays Methods", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - averageRating: Float + averageRating: Float @deprecated(reason: \\"Please use the explicit _SET field\\") averageRating_ADD: Float averageRating_DIVIDE: Float averageRating_MULTIPLY: Float + averageRating_SET: Float averageRating_SUBTRACT: Float - id: ID - ratings: [Float!] + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + ratings: [Float!] @deprecated(reason: \\"Please use the explicit _SET field\\") ratings_POP: Int ratings_PUSH: [Float!] + ratings_SET: [Float!] } input MovieWhere { diff --git a/packages/graphql/tests/schema/arrays.test.ts b/packages/graphql/tests/schema/arrays.test.ts index 80092e5486..0d45cf1286 100644 --- a/packages/graphql/tests/schema/arrays.test.ts +++ b/packages/graphql/tests/schema/arrays.test.ts @@ -114,15 +114,18 @@ describe("Arrays", () => { } input MovieUpdateInput { - averageRating: Float + averageRating: Float @deprecated(reason: \\"Please use the explicit _SET field\\") averageRating_ADD: Float averageRating_DIVIDE: Float averageRating_MULTIPLY: Float + averageRating_SET: Float averageRating_SUBTRACT: Float - id: ID - ratings: [Float!] + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + ratings: [Float!] @deprecated(reason: \\"Please use the explicit _SET field\\") ratings_POP: Int ratings_PUSH: [Float!] + ratings_SET: [Float!] } input MovieWhere { diff --git a/packages/graphql/tests/schema/authorization.test.ts b/packages/graphql/tests/schema/authorization.test.ts index f78cefefdf..1eb67b3a2b 100644 --- a/packages/graphql/tests/schema/authorization.test.ts +++ b/packages/graphql/tests/schema/authorization.test.ts @@ -246,8 +246,10 @@ describe("Authorization", () => { input PostUpdateInput { author: PostAuthorUpdateFieldInput - id: ID - name: String + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } type PostUserAuthorAggregationSelection { @@ -491,8 +493,10 @@ describe("Authorization", () => { } input UserUpdateInput { - id: ID - name: String + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String posts: [UserPostsUpdateFieldInput!] } diff --git a/packages/graphql/tests/schema/comments.test.ts b/packages/graphql/tests/schema/comments.test.ts index b3acbd0c5c..1eae9742e9 100644 --- a/packages/graphql/tests/schema/comments.test.ts +++ b/packages/graphql/tests/schema/comments.test.ts @@ -175,18 +175,24 @@ describe("Comments", () => { } input MovieUpdateInput { - actorCount: Int + actorCount: Int @deprecated(reason: \\"Please use the explicit _SET field\\") actorCount_DECREMENT: Int actorCount_INCREMENT: Int - averageRating: Float + actorCount_SET: Int + averageRating: Float @deprecated(reason: \\"Please use the explicit _SET field\\") averageRating_ADD: Float averageRating_DIVIDE: Float averageRating_MULTIPLY: Float + averageRating_SET: Float averageRating_SUBTRACT: Float - customScalar: CustomScalar - genre: Genre - id: ID - isActive: Boolean + customScalar: CustomScalar @deprecated(reason: \\"Please use the explicit _SET field\\") + customScalar_SET: CustomScalar + genre: Genre @deprecated(reason: \\"Please use the explicit _SET field\\") + genre_SET: Genre + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + isActive: Boolean @deprecated(reason: \\"Please use the explicit _SET field\\") + isActive_SET: Boolean } input MovieWhere { @@ -335,7 +341,8 @@ describe("Comments", () => { } input ActorUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -531,7 +538,8 @@ describe("Comments", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { @@ -716,9 +724,10 @@ describe("Comments", () => { } input ActedInUpdateInput { - screenTime: Int + screenTime: Int @deprecated(reason: \\"Please use the explicit _SET field\\") screenTime_DECREMENT: Int screenTime_INCREMENT: Int + screenTime_SET: Int } input ActedInWhere { @@ -890,7 +899,8 @@ describe("Comments", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -1013,10 +1023,12 @@ describe("Comments", () => { } input MovieUpdateInput { - runtime: Int + runtime: Int @deprecated(reason: \\"Please use the explicit _SET field\\") runtime_DECREMENT: Int runtime_INCREMENT: Int - title: String + runtime_SET: Int + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -1109,7 +1121,8 @@ describe("Comments", () => { } input ProductionUpdateInput { - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input ProductionWhere { @@ -1191,10 +1204,12 @@ describe("Comments", () => { } input SeriesUpdateInput { - episodes: Int + episodes: Int @deprecated(reason: \\"Please use the explicit _SET field\\") episodes_DECREMENT: Int episodes_INCREMENT: Int - title: String + episodes_SET: Int + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input SeriesWhere { @@ -1344,7 +1359,8 @@ describe("Comments", () => { } input GenreUpdateInput { - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input GenreWhere { @@ -1551,7 +1567,8 @@ describe("Comments", () => { } input MovieUpdateInput { - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID search: MovieSearchUpdateInput } diff --git a/packages/graphql/tests/schema/connections/enums.test.ts b/packages/graphql/tests/schema/connections/enums.test.ts index 4e50ada991..8d3292867e 100644 --- a/packages/graphql/tests/schema/connections/enums.test.ts +++ b/packages/graphql/tests/schema/connections/enums.test.ts @@ -71,7 +71,8 @@ describe("Enums", () => { } input ActedInUpdateInput { - roleType: RoleType + roleType: RoleType @deprecated(reason: \\"Please use the explicit _SET field\\") + roleType_SET: RoleType } input ActedInWhere { @@ -247,7 +248,8 @@ describe("Enums", () => { input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -483,7 +485,8 @@ describe("Enums", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { diff --git a/packages/graphql/tests/schema/connections/interfaces.test.ts b/packages/graphql/tests/schema/connections/interfaces.test.ts index 5260a6ff05..04deafc152 100644 --- a/packages/graphql/tests/schema/connections/interfaces.test.ts +++ b/packages/graphql/tests/schema/connections/interfaces.test.ts @@ -225,7 +225,8 @@ describe("Connection with interfaces", () => { } input CreatureUpdateInput { - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID movies: CreatureMoviesUpdateFieldInput } @@ -394,8 +395,10 @@ describe("Connection with interfaces", () => { input MovieUpdateInput { director: [MovieDirectorUpdateFieldInput!] - id: ID - title: String + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -591,7 +594,8 @@ describe("Connection with interfaces", () => { } input PersonUpdateInput { - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID movies: PersonMoviesUpdateFieldInput } @@ -753,7 +757,8 @@ describe("Connection with interfaces", () => { input ProductionUpdateInput { director: [ProductionDirectorUpdateFieldInput!] - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input ProductionWhere { @@ -959,11 +964,14 @@ describe("Connection with interfaces", () => { input SeriesUpdateInput { director: [SeriesDirectorUpdateFieldInput!] - episode: Int + episode: Int @deprecated(reason: \\"Please use the explicit _SET field\\") episode_DECREMENT: Int episode_INCREMENT: Int - id: ID - title: String + episode_SET: Int + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input SeriesWhere { diff --git a/packages/graphql/tests/schema/connections/sort.test.ts b/packages/graphql/tests/schema/connections/sort.test.ts index 9c76a655f5..7ad690b432 100644 --- a/packages/graphql/tests/schema/connections/sort.test.ts +++ b/packages/graphql/tests/schema/connections/sort.test.ts @@ -204,7 +204,8 @@ describe("Sort", () => { } input Node1UpdateInput { - property: String + property: String @deprecated(reason: \\"Please use the explicit _SET field\\") + property_SET: String relatedTo: [Node1RelatedToUpdateFieldInput!] } diff --git a/packages/graphql/tests/schema/connections/unions.test.ts b/packages/graphql/tests/schema/connections/unions.test.ts index 9f262df1ce..f970ac7edb 100644 --- a/packages/graphql/tests/schema/connections/unions.test.ts +++ b/packages/graphql/tests/schema/connections/unions.test.ts @@ -251,7 +251,8 @@ describe("Unions", () => { } input AuthorUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String publications: AuthorPublicationsUpdateInput } @@ -471,7 +472,8 @@ describe("Unions", () => { input BookUpdateInput { author: [BookAuthorUpdateFieldInput!] - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input BookWhere { @@ -725,7 +727,8 @@ describe("Unions", () => { input JournalUpdateInput { author: [JournalAuthorUpdateFieldInput!] - subject: String + subject: String @deprecated(reason: \\"Please use the explicit _SET field\\") + subject_SET: String } input JournalWhere { @@ -900,9 +903,10 @@ describe("Unions", () => { } input WroteUpdateInput { - words: Int + words: Int @deprecated(reason: \\"Please use the explicit _SET field\\") words_DECREMENT: Int words_INCREMENT: Int + words_SET: Int } input WroteWhere { diff --git a/packages/graphql/tests/schema/custom-mutations.test.ts b/packages/graphql/tests/schema/custom-mutations.test.ts index e2da7be6b0..8a5bbdebac 100644 --- a/packages/graphql/tests/schema/custom-mutations.test.ts +++ b/packages/graphql/tests/schema/custom-mutations.test.ts @@ -123,7 +123,8 @@ describe("Custom-mutations", () => { } input MovieUpdateInput { - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { diff --git a/packages/graphql/tests/schema/directive-preserve.test.ts b/packages/graphql/tests/schema/directive-preserve.test.ts index 4b814f1ca7..e1a91035ad 100644 --- a/packages/graphql/tests/schema/directive-preserve.test.ts +++ b/packages/graphql/tests/schema/directive-preserve.test.ts @@ -107,7 +107,8 @@ describe("Directive-preserve", () => { } input MovieUpdateInput { - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { @@ -429,7 +430,8 @@ describe("Directive-preserve", () => { input GenreUpdateInput { movies: [GenreMoviesUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input GenreWhere { @@ -648,15 +650,18 @@ describe("Directive-preserve", () => { input MovieUpdateInput { genres: [MovieGenresUpdateFieldInput!] @deprecated(reason: \\"Do not use\\") - imdbRating: Float + imdbRating: Float @deprecated(reason: \\"Please use the explicit _SET field\\") imdbRating_ADD: Float imdbRating_DIVIDE: Float imdbRating_MULTIPLY: Float + imdbRating_SET: Float imdbRating_SUBTRACT: Float - title: String - year: Int + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String + year: Int @deprecated(reason: \\"Please use the explicit _SET field\\") year_DECREMENT: Int year_INCREMENT: Int + year_SET: Int } input MovieWhere { @@ -865,7 +870,8 @@ describe("Directive-preserve", () => { } input ActedInUpdateInput { - role: String + role: String @deprecated(reason: \\"Please use the explicit _SET field\\") + role_SET: String } input ActedInWhere { @@ -1050,7 +1056,8 @@ describe("Directive-preserve", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -1261,10 +1268,12 @@ describe("Directive-preserve", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] @deprecated(reason: \\"Do not use\\") - runtime: Int + runtime: Int @deprecated(reason: \\"Please use the explicit _SET field\\") runtime_DECREMENT: Int runtime_INCREMENT: Int - title: String + runtime_SET: Int + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -1539,7 +1548,8 @@ describe("Directive-preserve", () => { input ProductionUpdateInput { actors: [ProductionActorsUpdateFieldInput!] - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input ProductionWhere { @@ -1734,10 +1744,12 @@ describe("Directive-preserve", () => { input SeriesUpdateInput { actors: [SeriesActorsUpdateFieldInput!] - episodes: Int + episodes: Int @deprecated(reason: \\"Please use the explicit _SET field\\") episodes_DECREMENT: Int episodes_INCREMENT: Int - title: String + episodes_SET: Int + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input SeriesWhere { @@ -1913,7 +1925,8 @@ describe("Directive-preserve", () => { } input ActedInUpdateInput { - role: String + role: String @deprecated(reason: \\"Please use the explicit _SET field\\") + role_SET: String } input ActedInWhere { @@ -2095,7 +2108,8 @@ describe("Directive-preserve", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -2341,10 +2355,12 @@ describe("Directive-preserve", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] @deprecated(reason: \\"Do not use\\") - runtime: Int + runtime: Int @deprecated(reason: \\"Please use the explicit _SET field\\") runtime_DECREMENT: Int runtime_INCREMENT: Int - title: String + runtime_SET: Int + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -2463,7 +2479,8 @@ describe("Directive-preserve", () => { } input ProductionUpdateInput { - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input ProductionWhere { @@ -2668,10 +2685,12 @@ describe("Directive-preserve", () => { input SeriesUpdateInput { actors: [SeriesActorsUpdateFieldInput!] - episodes: Int + episodes: Int @deprecated(reason: \\"Please use the explicit _SET field\\") episodes_DECREMENT: Int episodes_INCREMENT: Int - title: String + episodes_SET: Int + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input SeriesWhere { @@ -2835,7 +2854,8 @@ describe("Directive-preserve", () => { } input ActedInUpdateInput { - role: String + role: String @deprecated(reason: \\"Please use the explicit _SET field\\") + role_SET: String } input ActedInWhere { @@ -3017,7 +3037,8 @@ describe("Directive-preserve", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -3263,10 +3284,12 @@ describe("Directive-preserve", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - runtime: Int + runtime: Int @deprecated(reason: \\"Please use the explicit _SET field\\") runtime_DECREMENT: Int runtime_INCREMENT: Int - title: String + runtime_SET: Int + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -3385,7 +3408,8 @@ describe("Directive-preserve", () => { } input ProductionUpdateInput { - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input ProductionWhere { @@ -3590,10 +3614,12 @@ describe("Directive-preserve", () => { input SeriesUpdateInput { actors: [SeriesActorsUpdateFieldInput!] - episodes: Int + episodes: Int @deprecated(reason: \\"Please use the explicit _SET field\\") episodes_DECREMENT: Int episodes_INCREMENT: Int - title: String + episodes_SET: Int + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input SeriesWhere { @@ -3865,7 +3891,8 @@ describe("Directive-preserve", () => { input BlogUpdateInput { posts: [BlogPostsUpdateFieldInput!] - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input BlogWhere { @@ -4009,6 +4036,7 @@ describe("Directive-preserve", () => { input PostUpdateInput { content: String @deprecated(reason: \\"Do not use post.content\\") + content_SET: String @deprecated(reason: \\"Do not use post.content\\") } input PostWhere { @@ -4245,7 +4273,8 @@ describe("Directive-preserve", () => { input UserUpdateInput { content: UserContentUpdateInput @deprecated(reason: \\"Do not use user.content\\") - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input UserWhere { diff --git a/packages/graphql/tests/schema/directives/alias.test.ts b/packages/graphql/tests/schema/directives/alias.test.ts index e61b50d4d0..4067877bc1 100644 --- a/packages/graphql/tests/schema/directives/alias.test.ts +++ b/packages/graphql/tests/schema/directives/alias.test.ts @@ -216,10 +216,12 @@ describe("Alias", () => { } input ActorActedInPropsUpdateInput { - character: String - screenTime: Int + character: String @deprecated(reason: \\"Please use the explicit _SET field\\") + character_SET: String + screenTime: Int @deprecated(reason: \\"Please use the explicit _SET field\\") screenTime_DECREMENT: Int screenTime_INCREMENT: Int + screenTime_SET: Int } input ActorActedInPropsWhere { @@ -317,8 +319,10 @@ describe("Alias", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - city: String - name: String + city: String @deprecated(reason: \\"Please use the explicit _SET field\\") + city_SET: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -453,12 +457,14 @@ describe("Alias", () => { } input MovieUpdateInput { - rating: Float + rating: Float @deprecated(reason: \\"Please use the explicit _SET field\\") rating_ADD: Float rating_DIVIDE: Float rating_MULTIPLY: Float + rating_SET: Float rating_SUBTRACT: Float - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { diff --git a/packages/graphql/tests/schema/directives/autogenerate.test.ts b/packages/graphql/tests/schema/directives/autogenerate.test.ts index cf5759d131..588d5edcd4 100644 --- a/packages/graphql/tests/schema/directives/autogenerate.test.ts +++ b/packages/graphql/tests/schema/directives/autogenerate.test.ts @@ -103,7 +103,8 @@ describe("Autogenerate", () => { } input MovieUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input MovieWhere { diff --git a/packages/graphql/tests/schema/directives/customResolver.test.ts b/packages/graphql/tests/schema/directives/customResolver.test.ts index 233218d8aa..b8c1d1861e 100644 --- a/packages/graphql/tests/schema/directives/customResolver.test.ts +++ b/packages/graphql/tests/schema/directives/customResolver.test.ts @@ -229,9 +229,12 @@ describe("@customResolver directive", () => { } input UserUpdateInput { - id: ID - password: String - username: String + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + password: String @deprecated(reason: \\"Please use the explicit _SET field\\") + password_SET: String + username: String @deprecated(reason: \\"Please use the explicit _SET field\\") + username_SET: String } input UserWhere { diff --git a/packages/graphql/tests/schema/directives/cypher.test.ts b/packages/graphql/tests/schema/directives/cypher.test.ts index 330e5edf27..b1258a5a19 100644 --- a/packages/graphql/tests/schema/directives/cypher.test.ts +++ b/packages/graphql/tests/schema/directives/cypher.test.ts @@ -167,7 +167,8 @@ describe("Cypher", () => { } input ActorUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -344,7 +345,8 @@ describe("Cypher", () => { } input MovieUpdateInput { - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { @@ -923,7 +925,8 @@ describe("Cypher", () => { } input BlogUpdateInput { - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input BlogWhere { @@ -1030,7 +1033,8 @@ describe("Cypher", () => { } input PostUpdateInput { - content: String + content: String @deprecated(reason: \\"Please use the explicit _SET field\\") + content_SET: String } input PostWhere { @@ -1196,7 +1200,8 @@ describe("Cypher", () => { } input ActorUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -1479,7 +1484,8 @@ describe("Cypher", () => { } input ActorUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -1707,7 +1713,8 @@ describe("Cypher", () => { } input ActorUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -1802,7 +1809,8 @@ describe("Cypher", () => { } input MovieUpdateInput { - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { @@ -1996,7 +2004,8 @@ describe("Cypher", () => { } input MovieUpdateInput { - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } type MovieUpdatedEvent { diff --git a/packages/graphql/tests/schema/directives/default.test.ts b/packages/graphql/tests/schema/directives/default.test.ts index c55e5074d2..4da2ac7559 100644 --- a/packages/graphql/tests/schema/directives/default.test.ts +++ b/packages/graphql/tests/schema/directives/default.test.ts @@ -289,21 +289,30 @@ describe("@default directive", () => { } input UserUpdateInput { - fromInterface: String - id: ID - location: Location - name: String - numberOfFriends: Int + fromInterface: String @deprecated(reason: \\"Please use the explicit _SET field\\") + fromInterface_SET: String + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + location: Location @deprecated(reason: \\"Please use the explicit _SET field\\") + location_SET: Location + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String + numberOfFriends: Int @deprecated(reason: \\"Please use the explicit _SET field\\") numberOfFriends_DECREMENT: Int numberOfFriends_INCREMENT: Int - rating: Float + numberOfFriends_SET: Int + rating: Float @deprecated(reason: \\"Please use the explicit _SET field\\") rating_ADD: Float rating_DIVIDE: Float rating_MULTIPLY: Float + rating_SET: Float rating_SUBTRACT: Float - toBeOverridden: String - verified: Boolean - verifiedDate: DateTime + toBeOverridden: String @deprecated(reason: \\"Please use the explicit _SET field\\") + toBeOverridden_SET: String + verified: Boolean @deprecated(reason: \\"Please use the explicit _SET field\\") + verifiedDate: DateTime @deprecated(reason: \\"Please use the explicit _SET field\\") + verifiedDate_SET: DateTime + verified_SET: Boolean } input UserWhere { diff --git a/packages/graphql/tests/schema/directives/filterable.test.ts b/packages/graphql/tests/schema/directives/filterable.test.ts index 0410a94e5b..9719c0428e 100644 --- a/packages/graphql/tests/schema/directives/filterable.test.ts +++ b/packages/graphql/tests/schema/directives/filterable.test.ts @@ -1068,8 +1068,10 @@ describe("@filterable directive", () => { input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String + password: String @deprecated(reason: \\"Please use the explicit _SET field\\") + password_SET: String + username: String @deprecated(reason: \\"Please use the explicit _SET field\\") + username_SET: String } type ActorUpdatedEvent { @@ -1364,7 +1366,8 @@ describe("@filterable directive", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } type MovieUpdatedEvent { @@ -1712,8 +1715,10 @@ describe("@filterable directive", () => { input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String + password: String @deprecated(reason: \\"Please use the explicit _SET field\\") + password_SET: String + username: String @deprecated(reason: \\"Please use the explicit _SET field\\") + username_SET: String } type ActorUpdatedEvent { @@ -2008,7 +2013,8 @@ describe("@filterable directive", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } type MovieUpdatedEvent { @@ -2356,8 +2362,10 @@ describe("@filterable directive", () => { input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String + password: String @deprecated(reason: \\"Please use the explicit _SET field\\") + password_SET: String + username: String @deprecated(reason: \\"Please use the explicit _SET field\\") + username_SET: String } type ActorUpdatedEvent { @@ -2640,7 +2648,8 @@ describe("@filterable directive", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } type MovieUpdatedEvent { @@ -2985,8 +2994,10 @@ describe("@filterable directive", () => { input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String + password: String @deprecated(reason: \\"Please use the explicit _SET field\\") + password_SET: String + username: String @deprecated(reason: \\"Please use the explicit _SET field\\") + username_SET: String } type ActorUpdatedEvent { @@ -3232,7 +3243,8 @@ describe("@filterable directive", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } type MovieUpdatedEvent { @@ -3581,8 +3593,10 @@ describe("@filterable directive", () => { input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String + password: String @deprecated(reason: \\"Please use the explicit _SET field\\") + password_SET: String + username: String @deprecated(reason: \\"Please use the explicit _SET field\\") + username_SET: String } type ActorUpdatedEvent { @@ -3877,7 +3891,8 @@ describe("@filterable directive", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } type MovieUpdatedEvent { @@ -4227,8 +4242,10 @@ describe("@filterable directive", () => { input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String + password: String @deprecated(reason: \\"Please use the explicit _SET field\\") + password_SET: String + username: String @deprecated(reason: \\"Please use the explicit _SET field\\") + username_SET: String } type ActorUpdatedEvent { @@ -4523,7 +4540,8 @@ describe("@filterable directive", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } type MovieUpdatedEvent { @@ -4849,8 +4867,10 @@ describe("@filterable directive", () => { input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String + password: String @deprecated(reason: \\"Please use the explicit _SET field\\") + password_SET: String + username: String @deprecated(reason: \\"Please use the explicit _SET field\\") + username_SET: String } type ActorUpdatedEvent { @@ -5096,7 +5116,8 @@ describe("@filterable directive", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } type MovieUpdatedEvent { @@ -5438,8 +5459,10 @@ describe("@filterable directive", () => { input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String + password: String @deprecated(reason: \\"Please use the explicit _SET field\\") + password_SET: String + username: String @deprecated(reason: \\"Please use the explicit _SET field\\") + username_SET: String } type ActorUpdatedEvent { @@ -5681,7 +5704,8 @@ describe("@filterable directive", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } type MovieUpdatedEvent { @@ -5799,7 +5823,8 @@ describe("@filterable directive", () => { } input PersonUpdateInput { - username: String + username: String @deprecated(reason: \\"Please use the explicit _SET field\\") + username_SET: String } input PersonWhere { @@ -6091,8 +6116,10 @@ describe("@filterable directive", () => { input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String + password: String @deprecated(reason: \\"Please use the explicit _SET field\\") + password_SET: String + username: String @deprecated(reason: \\"Please use the explicit _SET field\\") + username_SET: String } type ActorUpdatedEvent { @@ -6368,7 +6395,8 @@ describe("@filterable directive", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } type MovieUpdatedEvent { @@ -6487,7 +6515,8 @@ describe("@filterable directive", () => { } input PersonUpdateInput { - username: String + username: String @deprecated(reason: \\"Please use the explicit _SET field\\") + username_SET: String } input PersonWhere { @@ -6779,8 +6808,10 @@ describe("@filterable directive", () => { input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String + password: String @deprecated(reason: \\"Please use the explicit _SET field\\") + password_SET: String + username: String @deprecated(reason: \\"Please use the explicit _SET field\\") + username_SET: String } type ActorUpdatedEvent { @@ -7022,7 +7053,8 @@ describe("@filterable directive", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } type MovieUpdatedEvent { @@ -7140,7 +7172,8 @@ describe("@filterable directive", () => { } input PersonUpdateInput { - username: String + username: String @deprecated(reason: \\"Please use the explicit _SET field\\") + username_SET: String } input PersonWhere { @@ -7448,8 +7481,10 @@ describe("@filterable directive", () => { input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String + password: String @deprecated(reason: \\"Please use the explicit _SET field\\") + password_SET: String + username: String @deprecated(reason: \\"Please use the explicit _SET field\\") + username_SET: String } type ActorUpdatedEvent { @@ -7705,8 +7740,10 @@ describe("@filterable directive", () => { input AppearanceUpdateInput { movies: [AppearanceMoviesUpdateFieldInput!] - password: String - username: String + password: String @deprecated(reason: \\"Please use the explicit _SET field\\") + password_SET: String + username: String @deprecated(reason: \\"Please use the explicit _SET field\\") + username_SET: String } type AppearanceUpdatedEvent { @@ -8016,7 +8053,8 @@ describe("@filterable directive", () => { input MovieUpdateInput { actors: MovieActorsUpdateInput - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } type MovieUpdatedEvent { @@ -8402,8 +8440,10 @@ describe("@filterable directive", () => { input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String + password: String @deprecated(reason: \\"Please use the explicit _SET field\\") + password_SET: String + username: String @deprecated(reason: \\"Please use the explicit _SET field\\") + username_SET: String } type ActorUpdatedEvent { @@ -8659,8 +8699,10 @@ describe("@filterable directive", () => { input AppearanceUpdateInput { movies: [AppearanceMoviesUpdateFieldInput!] - password: String - username: String + password: String @deprecated(reason: \\"Please use the explicit _SET field\\") + password_SET: String + username: String @deprecated(reason: \\"Please use the explicit _SET field\\") + username_SET: String } type AppearanceUpdatedEvent { @@ -8970,7 +9012,8 @@ describe("@filterable directive", () => { input MovieUpdateInput { actors: MovieActorsUpdateInput - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } type MovieUpdatedEvent { @@ -9356,8 +9399,10 @@ describe("@filterable directive", () => { input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - password: String - username: String + password: String @deprecated(reason: \\"Please use the explicit _SET field\\") + password_SET: String + username: String @deprecated(reason: \\"Please use the explicit _SET field\\") + username_SET: String } type ActorUpdatedEvent { @@ -9613,8 +9658,10 @@ describe("@filterable directive", () => { input AppearanceUpdateInput { movies: [AppearanceMoviesUpdateFieldInput!] - password: String - username: String + password: String @deprecated(reason: \\"Please use the explicit _SET field\\") + password_SET: String + username: String @deprecated(reason: \\"Please use the explicit _SET field\\") + username_SET: String } type AppearanceUpdatedEvent { @@ -9924,7 +9971,8 @@ describe("@filterable directive", () => { input MovieUpdateInput { actors: MovieActorsUpdateInput - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } type MovieUpdatedEvent { diff --git a/packages/graphql/tests/schema/directives/plural.test.ts b/packages/graphql/tests/schema/directives/plural.test.ts index e0c441a810..fc73835c95 100644 --- a/packages/graphql/tests/schema/directives/plural.test.ts +++ b/packages/graphql/tests/schema/directives/plural.test.ts @@ -135,8 +135,10 @@ describe("Plural option", () => { } input TechUpdateInput { - name: String - value: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String + value: String @deprecated(reason: \\"Please use the explicit _SET field\\") + value_SET: String } input TechWhere { @@ -292,8 +294,10 @@ describe("Plural option", () => { } input TechUpdateInput { - name: String - value: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String + value: String @deprecated(reason: \\"Please use the explicit _SET field\\") + value_SET: String } input TechWhere { @@ -449,8 +453,10 @@ describe("Plural option", () => { } input TechUpdateInput { - name: String - value: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String + value: String @deprecated(reason: \\"Please use the explicit _SET field\\") + value_SET: String } input TechWhere { @@ -608,7 +614,8 @@ describe("Plural option", () => { } input TechsUpdateInput { - value: String + value: String @deprecated(reason: \\"Please use the explicit _SET field\\") + value_SET: String } input TechsWhere { @@ -769,7 +776,8 @@ describe("Plural option", () => { } input UserUpdateInput { - value: String + value: String @deprecated(reason: \\"Please use the explicit _SET field\\") + value_SET: String } input UserWhere { @@ -909,7 +917,8 @@ describe("Plural option", () => { } input UserUpdateInput { - value: String + value: String @deprecated(reason: \\"Please use the explicit _SET field\\") + value_SET: String } input UserWhere { @@ -1061,7 +1070,8 @@ describe("Plural option", () => { } input UsersUpdateInput { - value: String + value: String @deprecated(reason: \\"Please use the explicit _SET field\\") + value_SET: String } input UsersWhere { diff --git a/packages/graphql/tests/schema/directives/populatedBy.test.ts b/packages/graphql/tests/schema/directives/populatedBy.test.ts index 75ca7dd298..45e9bbc0b2 100644 --- a/packages/graphql/tests/schema/directives/populatedBy.test.ts +++ b/packages/graphql/tests/schema/directives/populatedBy.test.ts @@ -233,8 +233,10 @@ describe("@populatedBy tests", () => { } input MovieUpdateInput { - callback1: String - id: ID + callback1: String @deprecated(reason: \\"Please use the explicit _SET field\\") + callback1_SET: String + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { @@ -436,10 +438,12 @@ describe("@populatedBy tests", () => { } input MovieUpdateInput { - callback1: Int + callback1: Int @deprecated(reason: \\"Please use the explicit _SET field\\") callback1_DECREMENT: Int callback1_INCREMENT: Int - id: ID + callback1_SET: Int + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { @@ -770,7 +774,8 @@ describe("@populatedBy tests", () => { } input GenreUpdateInput { - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input GenreWhere { @@ -949,7 +954,8 @@ describe("@populatedBy tests", () => { input MovieUpdateInput { genres: [MovieGenresUpdateFieldInput!] - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { @@ -1106,8 +1112,10 @@ describe("@populatedBy tests", () => { } input RelPropertiesUpdateInput { - callback1: String - id: ID + callback1: String @deprecated(reason: \\"Please use the explicit _SET field\\") + callback1_SET: String + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input RelPropertiesWhere { @@ -1284,7 +1292,8 @@ describe("@populatedBy tests", () => { } input GenreUpdateInput { - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input GenreWhere { @@ -1470,7 +1479,8 @@ describe("@populatedBy tests", () => { input MovieUpdateInput { genres: [MovieGenresUpdateFieldInput!] - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { @@ -1642,10 +1652,12 @@ describe("@populatedBy tests", () => { } input RelPropertiesUpdateInput { - callback1: Int + callback1: Int @deprecated(reason: \\"Please use the explicit _SET field\\") callback1_DECREMENT: Int callback1_INCREMENT: Int - id: ID + callback1_SET: Int + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input RelPropertiesWhere { diff --git a/packages/graphql/tests/schema/directives/private.test.ts b/packages/graphql/tests/schema/directives/private.test.ts index 4fd54c7869..bad7f55fcd 100644 --- a/packages/graphql/tests/schema/directives/private.test.ts +++ b/packages/graphql/tests/schema/directives/private.test.ts @@ -205,7 +205,8 @@ describe("@private directive", () => { } input UserUpdateInput { - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input UserWhere { @@ -419,8 +420,10 @@ describe("@private directive", () => { } input UserUpdateInput { - id: ID - private: String + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + private: String @deprecated(reason: \\"Please use the explicit _SET field\\") + private_SET: String } input UserWhere { diff --git a/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts b/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts index c28bc2b39b..e2d239f94b 100644 --- a/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts @@ -270,8 +270,10 @@ describe("@relationship directive, aggregate argument", () => { } input ActorUpdateInput { - password: String - username: String + password: String @deprecated(reason: \\"Please use the explicit _SET field\\") + password_SET: String + username: String @deprecated(reason: \\"Please use the explicit _SET field\\") + username_SET: String } input ActorWhere { @@ -472,7 +474,8 @@ describe("@relationship directive, aggregate argument", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -644,8 +647,10 @@ describe("@relationship directive, aggregate argument", () => { } input ActorUpdateInput { - password: String - username: String + password: String @deprecated(reason: \\"Please use the explicit _SET field\\") + password_SET: String + username: String @deprecated(reason: \\"Please use the explicit _SET field\\") + username_SET: String } input ActorWhere { @@ -857,7 +862,8 @@ describe("@relationship directive, aggregate argument", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -1031,8 +1037,10 @@ describe("@relationship directive, aggregate argument", () => { } input ActorUpdateInput { - password: String - username: String + password: String @deprecated(reason: \\"Please use the explicit _SET field\\") + password_SET: String + username: String @deprecated(reason: \\"Please use the explicit _SET field\\") + username_SET: String } input ActorWhere { @@ -1233,7 +1241,8 @@ describe("@relationship directive, aggregate argument", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -1348,8 +1357,10 @@ describe("@relationship directive, aggregate argument", () => { } input PersonUpdateInput { - password: String - username: String + password: String @deprecated(reason: \\"Please use the explicit _SET field\\") + password_SET: String + username: String @deprecated(reason: \\"Please use the explicit _SET field\\") + username_SET: String } input PersonWhere { @@ -1483,8 +1494,10 @@ describe("@relationship directive, aggregate argument", () => { } input ActorUpdateInput { - password: String - username: String + password: String @deprecated(reason: \\"Please use the explicit _SET field\\") + password_SET: String + username: String @deprecated(reason: \\"Please use the explicit _SET field\\") + username_SET: String } input ActorWhere { @@ -1696,7 +1709,8 @@ describe("@relationship directive, aggregate argument", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -1811,8 +1825,10 @@ describe("@relationship directive, aggregate argument", () => { } input PersonUpdateInput { - password: String - username: String + password: String @deprecated(reason: \\"Please use the explicit _SET field\\") + password_SET: String + username: String @deprecated(reason: \\"Please use the explicit _SET field\\") + username_SET: String } input PersonWhere { @@ -1954,8 +1970,10 @@ describe("@relationship directive, aggregate argument", () => { } input ActorUpdateInput { - password: String - username: String + password: String @deprecated(reason: \\"Please use the explicit _SET field\\") + password_SET: String + username: String @deprecated(reason: \\"Please use the explicit _SET field\\") + username_SET: String } input ActorWhere { @@ -2176,7 +2194,8 @@ describe("@relationship directive, aggregate argument", () => { input MovieUpdateInput { actors: MovieActorsUpdateInput - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -2286,7 +2305,8 @@ describe("@relationship directive, aggregate argument", () => { } input PersonUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonWhere { @@ -2430,8 +2450,10 @@ describe("@relationship directive, aggregate argument", () => { } input ActorUpdateInput { - password: String - username: String + password: String @deprecated(reason: \\"Please use the explicit _SET field\\") + password_SET: String + username: String @deprecated(reason: \\"Please use the explicit _SET field\\") + username_SET: String } input ActorWhere { @@ -2652,7 +2674,8 @@ describe("@relationship directive, aggregate argument", () => { input MovieUpdateInput { actors: MovieActorsUpdateInput - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -2762,7 +2785,8 @@ describe("@relationship directive, aggregate argument", () => { } input PersonUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonWhere { diff --git a/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts b/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts index 4384a5ca10..cf783a498d 100644 --- a/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts @@ -184,7 +184,8 @@ describe("Relationship nested operations", () => { } input MovieUpdateInput { - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { @@ -288,7 +289,8 @@ describe("Relationship nested operations", () => { } input PersonUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonWhere { @@ -516,7 +518,8 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { @@ -620,7 +623,8 @@ describe("Relationship nested operations", () => { } input PersonUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonWhere { @@ -848,7 +852,8 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { @@ -956,7 +961,8 @@ describe("Relationship nested operations", () => { } input PersonUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonWhere { @@ -1179,7 +1185,8 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { @@ -1283,7 +1290,8 @@ describe("Relationship nested operations", () => { } input PersonUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonWhere { @@ -1510,7 +1518,8 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { @@ -1614,7 +1623,8 @@ describe("Relationship nested operations", () => { } input PersonUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonWhere { @@ -1837,7 +1847,8 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { @@ -1941,7 +1952,8 @@ describe("Relationship nested operations", () => { } input PersonUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonWhere { @@ -2155,7 +2167,8 @@ describe("Relationship nested operations", () => { } input MovieUpdateInput { - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { @@ -2259,7 +2272,8 @@ describe("Relationship nested operations", () => { } input PersonUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonWhere { @@ -2485,7 +2499,8 @@ describe("Relationship nested operations", () => { } input MovieUpdateInput { - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { @@ -2592,7 +2607,8 @@ describe("Relationship nested operations", () => { } input PersonUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonWhere { @@ -2929,7 +2945,8 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID producers: [MovieProducersUpdateFieldInput!] } @@ -3063,7 +3080,8 @@ describe("Relationship nested operations", () => { } input PersonUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonWhere { @@ -3369,7 +3387,8 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID producers: [MovieProducersUpdateFieldInput!] } @@ -3499,7 +3518,8 @@ describe("Relationship nested operations", () => { } input PersonUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonWhere { @@ -3694,7 +3714,8 @@ describe("Relationship nested operations", () => { } input MovieUpdateInput { - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { @@ -3796,7 +3817,8 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonOneWhere { @@ -3852,7 +3874,8 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - nameTwo: String + nameTwo: String @deprecated(reason: \\"Please use the explicit _SET field\\") + nameTwo_SET: String } input PersonTwoWhere { @@ -4104,7 +4127,8 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: MovieActorsUpdateInput - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { @@ -4206,7 +4230,8 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonOneWhere { @@ -4262,7 +4287,8 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - nameTwo: String + nameTwo: String @deprecated(reason: \\"Please use the explicit _SET field\\") + nameTwo_SET: String } input PersonTwoWhere { @@ -4514,7 +4540,8 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: MovieActorsUpdateInput - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { @@ -4620,7 +4647,8 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonOneWhere { @@ -4680,7 +4708,8 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - nameTwo: String + nameTwo: String @deprecated(reason: \\"Please use the explicit _SET field\\") + nameTwo_SET: String } input PersonTwoWhere { @@ -4918,7 +4947,8 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: MovieActorsUpdateInput - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { @@ -5020,7 +5050,8 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonOneWhere { @@ -5076,7 +5107,8 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - nameTwo: String + nameTwo: String @deprecated(reason: \\"Please use the explicit _SET field\\") + nameTwo_SET: String } input PersonTwoWhere { @@ -5323,7 +5355,8 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: MovieActorsUpdateInput - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { @@ -5425,7 +5458,8 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonOneWhere { @@ -5481,7 +5515,8 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - nameTwo: String + nameTwo: String @deprecated(reason: \\"Please use the explicit _SET field\\") + nameTwo_SET: String } input PersonTwoWhere { @@ -5719,7 +5754,8 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: MovieActorsUpdateInput - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { @@ -5821,7 +5857,8 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonOneWhere { @@ -5877,7 +5914,8 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - nameTwo: String + nameTwo: String @deprecated(reason: \\"Please use the explicit _SET field\\") + nameTwo_SET: String } input PersonTwoWhere { @@ -6092,7 +6130,8 @@ describe("Relationship nested operations", () => { } input MovieUpdateInput { - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { @@ -6194,7 +6233,8 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonOneWhere { @@ -6250,7 +6290,8 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - nameTwo: String + nameTwo: String @deprecated(reason: \\"Please use the explicit _SET field\\") + nameTwo_SET: String } input PersonTwoWhere { @@ -6467,7 +6508,8 @@ describe("Relationship nested operations", () => { } input MovieUpdateInput { - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { @@ -6572,7 +6614,8 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonOneWhere { @@ -6637,7 +6680,8 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - nameTwo: String + nameTwo: String @deprecated(reason: \\"Please use the explicit _SET field\\") + nameTwo_SET: String } input PersonTwoWhere { @@ -7002,7 +7046,8 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: MovieActorsUpdateInput - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID producers: MovieProducersUpdateInput } @@ -7133,7 +7178,8 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonOneWhere { @@ -7193,7 +7239,8 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - nameTwo: String + nameTwo: String @deprecated(reason: \\"Please use the explicit _SET field\\") + nameTwo_SET: String } input PersonTwoWhere { @@ -7501,7 +7548,8 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: MovieActorsUpdateInput - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID producers: MovieProducersUpdateInput } @@ -7628,7 +7676,8 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonOneWhere { @@ -7684,7 +7733,8 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - nameTwo: String + nameTwo: String @deprecated(reason: \\"Please use the explicit _SET field\\") + nameTwo_SET: String } input PersonTwoWhere { @@ -7944,7 +7994,8 @@ describe("Relationship nested operations", () => { } input MovieUpdateInput { - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { @@ -8072,10 +8123,12 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name: String - someExtraProp: [Int!] + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String + someExtraProp: [Int!] @deprecated(reason: \\"Please use the explicit _SET field\\") someExtraProp_POP: Int someExtraProp_PUSH: [Int!] + someExtraProp_SET: [Int!] } input PersonOneWhere { @@ -8150,7 +8203,8 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonTwoWhere { @@ -8422,7 +8476,8 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { @@ -8555,10 +8610,12 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name: String - someExtraProp: [Int!] + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String + someExtraProp: [Int!] @deprecated(reason: \\"Please use the explicit _SET field\\") someExtraProp_POP: Int someExtraProp_PUSH: [Int!] + someExtraProp_SET: [Int!] } input PersonOneWhere { @@ -8633,7 +8690,8 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonTwoWhere { @@ -8905,7 +8963,8 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { @@ -9037,10 +9096,12 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name: String - someExtraProp: [Int!] + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String + someExtraProp: [Int!] @deprecated(reason: \\"Please use the explicit _SET field\\") someExtraProp_POP: Int someExtraProp_PUSH: [Int!] + someExtraProp_SET: [Int!] } input PersonOneWhere { @@ -9115,7 +9176,8 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonTwoWhere { @@ -9382,7 +9444,8 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { @@ -9510,10 +9573,12 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name: String - someExtraProp: [Int!] + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String + someExtraProp: [Int!] @deprecated(reason: \\"Please use the explicit _SET field\\") someExtraProp_POP: Int someExtraProp_PUSH: [Int!] + someExtraProp_SET: [Int!] } input PersonOneWhere { @@ -9588,7 +9653,8 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonTwoWhere { @@ -9610,7 +9676,8 @@ describe("Relationship nested operations", () => { } input PersonUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonWhere { @@ -9863,7 +9930,8 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { @@ -9991,10 +10059,12 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name: String - someExtraProp: [Int!] + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String + someExtraProp: [Int!] @deprecated(reason: \\"Please use the explicit _SET field\\") someExtraProp_POP: Int someExtraProp_PUSH: [Int!] + someExtraProp_SET: [Int!] } input PersonOneWhere { @@ -10069,7 +10139,8 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonTwoWhere { @@ -10336,7 +10407,8 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { @@ -10464,10 +10536,12 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name: String - someExtraProp: [Int!] + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String + someExtraProp: [Int!] @deprecated(reason: \\"Please use the explicit _SET field\\") someExtraProp_POP: Int someExtraProp_PUSH: [Int!] + someExtraProp_SET: [Int!] } input PersonOneWhere { @@ -10542,7 +10616,8 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonTwoWhere { @@ -10917,7 +10992,8 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID producers: [MovieProducersUpdateFieldInput!] } @@ -11080,10 +11156,12 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name: String - someExtraProp: [Int!] + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String + someExtraProp: [Int!] @deprecated(reason: \\"Please use the explicit _SET field\\") someExtraProp_POP: Int someExtraProp_PUSH: [Int!] + someExtraProp_SET: [Int!] } input PersonOneWhere { @@ -11158,7 +11236,8 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonTwoWhere { @@ -11180,7 +11259,8 @@ describe("Relationship nested operations", () => { } input PersonUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonWhere { @@ -11522,7 +11602,8 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID producers: [MovieProducersUpdateFieldInput!] } @@ -11681,10 +11762,12 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name: String - someExtraProp: [Int!] + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String + someExtraProp: [Int!] @deprecated(reason: \\"Please use the explicit _SET field\\") someExtraProp_POP: Int someExtraProp_PUSH: [Int!] + someExtraProp_SET: [Int!] } input PersonOneWhere { @@ -11759,7 +11842,8 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonTwoWhere { diff --git a/packages/graphql/tests/schema/directives/relationship-properties.test.ts b/packages/graphql/tests/schema/directives/relationship-properties.test.ts index a32ed27b36..87c74547f3 100644 --- a/packages/graphql/tests/schema/directives/relationship-properties.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-properties.test.ts @@ -100,11 +100,14 @@ describe("Relationship-properties", () => { } input ActedInUpdateInput { - leadRole: Boolean - screenTime: Int + leadRole: Boolean @deprecated(reason: \\"Please use the explicit _SET field\\") + leadRole_SET: Boolean + screenTime: Int @deprecated(reason: \\"Please use the explicit _SET field\\") screenTime_DECREMENT: Int screenTime_INCREMENT: Int - startDate: Date + screenTime_SET: Int + startDate: Date @deprecated(reason: \\"Please use the explicit _SET field\\") + startDate_SET: Date } input ActedInWhere { @@ -299,7 +302,8 @@ describe("Relationship-properties", () => { input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -551,7 +555,8 @@ describe("Relationship-properties", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -753,9 +758,10 @@ describe("Relationship-properties", () => { } input ActedInUpdateInput { - screenTime: Int + screenTime: Int @deprecated(reason: \\"Please use the explicit _SET field\\") screenTime_DECREMENT: Int screenTime_INCREMENT: Int + screenTime_SET: Int } input ActedInWhere { @@ -956,7 +962,8 @@ describe("Relationship-properties", () => { input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -1220,7 +1227,8 @@ describe("Relationship-properties", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -1581,7 +1589,8 @@ describe("Relationship-properties", () => { input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -1834,7 +1843,8 @@ describe("Relationship-properties", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { diff --git a/packages/graphql/tests/schema/directives/relationship.test.ts b/packages/graphql/tests/schema/directives/relationship.test.ts index ed87227614..0fbba2052f 100644 --- a/packages/graphql/tests/schema/directives/relationship.test.ts +++ b/packages/graphql/tests/schema/directives/relationship.test.ts @@ -82,7 +82,8 @@ describe("Relationship", () => { } input ActorUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -277,7 +278,8 @@ describe("Relationship", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { @@ -558,7 +560,8 @@ describe("Relationship", () => { input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -793,7 +796,8 @@ describe("Relationship", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { diff --git a/packages/graphql/tests/schema/directives/selectable.test.ts b/packages/graphql/tests/schema/directives/selectable.test.ts index 5274ff69cc..a7507a87c9 100644 --- a/packages/graphql/tests/schema/directives/selectable.test.ts +++ b/packages/graphql/tests/schema/directives/selectable.test.ts @@ -98,8 +98,10 @@ describe("@selectable", () => { } input MovieUpdateInput { - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -250,8 +252,10 @@ describe("@selectable", () => { } input MovieUpdateInput { - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -401,8 +405,10 @@ describe("@selectable", () => { } input MovieUpdateInput { - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -596,8 +602,10 @@ describe("@selectable", () => { } input MovieUpdateInput { - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } type MovieUpdatedEvent { @@ -852,7 +860,8 @@ describe("@selectable", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -967,8 +976,10 @@ describe("@selectable", () => { } input MovieUpdateInput { - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -1236,7 +1247,8 @@ describe("@selectable", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -1351,8 +1363,10 @@ describe("@selectable", () => { } input MovieUpdateInput { - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -1614,7 +1628,8 @@ describe("@selectable", () => { input ActorUpdateInput { actedIn: ActorActedInUpdateInput - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -1733,8 +1748,10 @@ describe("@selectable", () => { } input MovieUpdateInput { - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -1856,8 +1873,10 @@ describe("@selectable", () => { } input SeriesUpdateInput { - description: String - name: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input SeriesWhere { @@ -2102,7 +2121,8 @@ describe("@selectable", () => { input ActorUpdateInput { actedIn: ActorActedInUpdateInput - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -2221,8 +2241,10 @@ describe("@selectable", () => { } input MovieUpdateInput { - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -2344,8 +2366,10 @@ describe("@selectable", () => { } input SeriesUpdateInput { - description: String - name: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input SeriesWhere { @@ -2582,7 +2606,8 @@ describe("@selectable", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -2698,8 +2723,10 @@ describe("@selectable", () => { } input MovieUpdateInput { - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -2794,8 +2821,10 @@ describe("@selectable", () => { } input ProductionUpdateInput { - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input ProductionWhere { @@ -2883,8 +2912,10 @@ describe("@selectable", () => { } input SeriesUpdateInput { - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input SeriesWhere { @@ -3135,7 +3166,8 @@ describe("@selectable", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -3251,8 +3283,10 @@ describe("@selectable", () => { } input MovieUpdateInput { - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -3347,8 +3381,10 @@ describe("@selectable", () => { } input ProductionUpdateInput { - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input ProductionWhere { @@ -3436,8 +3472,10 @@ describe("@selectable", () => { } input SeriesUpdateInput { - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input SeriesWhere { diff --git a/packages/graphql/tests/schema/directives/settable.test.ts b/packages/graphql/tests/schema/directives/settable.test.ts index b984501f83..c14474b3d5 100644 --- a/packages/graphql/tests/schema/directives/settable.test.ts +++ b/packages/graphql/tests/schema/directives/settable.test.ts @@ -98,8 +98,10 @@ describe("@settable", () => { } input MovieUpdateInput { - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -251,7 +253,8 @@ describe("@settable", () => { } input MovieUpdateInput { - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -446,7 +449,8 @@ describe("@settable", () => { } input MovieUpdateInput { - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } type MovieUpdatedEvent { @@ -712,7 +716,8 @@ describe("@settable", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -827,8 +832,10 @@ describe("@settable", () => { } input MovieUpdateInput { - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -1079,7 +1086,8 @@ describe("@settable", () => { } input ActorUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -1194,8 +1202,10 @@ describe("@settable", () => { } input MovieUpdateInput { - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -1464,7 +1474,8 @@ describe("@settable", () => { } input ActorUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -1698,8 +1709,10 @@ describe("@settable", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -2001,7 +2014,8 @@ describe("@settable", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -2235,8 +2249,10 @@ describe("@settable", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -2519,7 +2535,8 @@ describe("@settable", () => { input ActorUpdateInput { actedIn: ActorActedInUpdateInput - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -2638,8 +2655,10 @@ describe("@settable", () => { } input MovieUpdateInput { - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -2761,8 +2780,10 @@ describe("@settable", () => { } input SeriesUpdateInput { - description: String - name: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input SeriesWhere { @@ -2968,7 +2989,8 @@ describe("@settable", () => { } input ActorUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -3087,8 +3109,10 @@ describe("@settable", () => { } input MovieUpdateInput { - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -3210,8 +3234,10 @@ describe("@settable", () => { } input SeriesUpdateInput { - description: String - name: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input SeriesWhere { @@ -3449,7 +3475,8 @@ describe("@settable", () => { } input ActorUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -3687,8 +3714,10 @@ describe("@settable", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -3835,8 +3864,10 @@ describe("@settable", () => { } input SeriesUpdateInput { - description: String - name: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input SeriesWhere { @@ -4090,7 +4121,8 @@ describe("@settable", () => { input ActorUpdateInput { actedIn: ActorActedInUpdateInput - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -4328,8 +4360,10 @@ describe("@settable", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -4476,8 +4510,10 @@ describe("@settable", () => { } input SeriesUpdateInput { - description: String - name: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input SeriesWhere { @@ -4725,7 +4761,8 @@ describe("@settable", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -4841,8 +4878,10 @@ describe("@settable", () => { } input MovieUpdateInput { - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -4937,8 +4976,10 @@ describe("@settable", () => { } input ProductionUpdateInput { - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input ProductionWhere { @@ -5026,8 +5067,10 @@ describe("@settable", () => { } input SeriesUpdateInput { - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input SeriesWhere { @@ -5261,7 +5304,8 @@ describe("@settable", () => { } input ActorUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -5377,8 +5421,10 @@ describe("@settable", () => { } input MovieUpdateInput { - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -5557,8 +5603,10 @@ describe("@settable", () => { } input SeriesUpdateInput { - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input SeriesWhere { @@ -5812,7 +5860,8 @@ describe("@settable", () => { } input ActorUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -6007,8 +6056,10 @@ describe("@settable", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -6401,8 +6452,10 @@ describe("@settable", () => { input SeriesUpdateInput { actors: [SeriesActorsUpdateFieldInput!] - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input SeriesWhere { @@ -6689,7 +6742,8 @@ describe("@settable", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -6884,8 +6938,10 @@ describe("@settable", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -7108,8 +7164,10 @@ describe("@settable", () => { input ProductionUpdateInput { actors: [ProductionActorsUpdateFieldInput!] - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input ProductionWhere { @@ -7301,8 +7359,10 @@ describe("@settable", () => { input SeriesUpdateInput { actors: [SeriesActorsUpdateFieldInput!] - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input SeriesWhere { diff --git a/packages/graphql/tests/schema/directives/timestamps.test.ts b/packages/graphql/tests/schema/directives/timestamps.test.ts index 622704373b..9da0dd2ca1 100644 --- a/packages/graphql/tests/schema/directives/timestamps.test.ts +++ b/packages/graphql/tests/schema/directives/timestamps.test.ts @@ -116,8 +116,10 @@ describe("Timestamps", () => { } input MovieUpdateInput { - createdAt: DateTime - id: ID + createdAt: DateTime @deprecated(reason: \\"Please use the explicit _SET field\\") + createdAt_SET: DateTime + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { diff --git a/packages/graphql/tests/schema/enum.test.ts b/packages/graphql/tests/schema/enum.test.ts index 4963aa8794..347e9928bd 100644 --- a/packages/graphql/tests/schema/enum.test.ts +++ b/packages/graphql/tests/schema/enum.test.ts @@ -99,7 +99,8 @@ describe("Enum", () => { } input MovieUpdateInput { - status: Status + status: Status @deprecated(reason: \\"Please use the explicit _SET field\\") + status_SET: Status } input MovieWhere { diff --git a/packages/graphql/tests/schema/extend.test.ts b/packages/graphql/tests/schema/extend.test.ts index 97b7367858..3d1b3ba1db 100644 --- a/packages/graphql/tests/schema/extend.test.ts +++ b/packages/graphql/tests/schema/extend.test.ts @@ -107,8 +107,10 @@ describe("Extend", () => { } input MovieUpdateInput { - id: ID - name: String + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input MovieWhere { diff --git a/packages/graphql/tests/schema/federation.test.ts b/packages/graphql/tests/schema/federation.test.ts index 252eef0b12..afe1248ada 100644 --- a/packages/graphql/tests/schema/federation.test.ts +++ b/packages/graphql/tests/schema/federation.test.ts @@ -261,7 +261,8 @@ describe("Apollo Federation", () => { input PostUpdateInput { author: PostAuthorUpdateFieldInput - content: String + content: String @deprecated(reason: \\"Please use the explicit _SET field\\") + content_SET: String } type PostUserAuthorAggregationSelection { @@ -494,7 +495,8 @@ describe("Apollo Federation", () => { } input UserUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String posts: [UserPostsUpdateFieldInput!] } @@ -786,7 +788,8 @@ describe("Apollo Federation", () => { input PostUpdateInput { author: PostAuthorUpdateFieldInput - content: String + content: String @deprecated(reason: \\"Please use the explicit _SET field\\") + content_SET: String } type PostUserAuthorAggregationSelection { @@ -902,7 +905,8 @@ describe("Apollo Federation", () => { } input UserUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input UserWhere { diff --git a/packages/graphql/tests/schema/fulltext.test.ts b/packages/graphql/tests/schema/fulltext.test.ts index 7e5774a6ac..bf9bf03d69 100644 --- a/packages/graphql/tests/schema/fulltext.test.ts +++ b/packages/graphql/tests/schema/fulltext.test.ts @@ -131,8 +131,10 @@ describe("@fulltext schema", () => { } input MovieUpdateInput { - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { diff --git a/packages/graphql/tests/schema/global-node.test.ts b/packages/graphql/tests/schema/global-node.test.ts index 1513296944..5743b78d45 100644 --- a/packages/graphql/tests/schema/global-node.test.ts +++ b/packages/graphql/tests/schema/global-node.test.ts @@ -105,8 +105,10 @@ describe("Node Interface Types", () => { } input MovieUpdateInput { - imdb: ID - title: String + imdb: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + imdb_SET: ID + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { diff --git a/packages/graphql/tests/schema/inheritance.test.ts b/packages/graphql/tests/schema/inheritance.test.ts index 1760db7474..2a3907a208 100644 --- a/packages/graphql/tests/schema/inheritance.test.ts +++ b/packages/graphql/tests/schema/inheritance.test.ts @@ -191,7 +191,8 @@ describe("inheritance", () => { input ActorUpdateInput { friends: [ActorFriendsUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -301,9 +302,10 @@ describe("inheritance", () => { } input FriendsWithUpdateInput { - since: Int + since: Int @deprecated(reason: \\"Please use the explicit _SET field\\") since_DECREMENT: Int since_INCREMENT: Int + since_SET: Int } input FriendsWithWhere { @@ -541,7 +543,8 @@ describe("inheritance", () => { input PersonUpdateInput { friends: [PersonFriendsUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonWhere { diff --git a/packages/graphql/tests/schema/inputs.test.ts b/packages/graphql/tests/schema/inputs.test.ts index c38b21234a..15fb4acd5a 100644 --- a/packages/graphql/tests/schema/inputs.test.ts +++ b/packages/graphql/tests/schema/inputs.test.ts @@ -107,7 +107,8 @@ describe("Inputs", () => { } input MovieUpdateInput { - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { diff --git a/packages/graphql/tests/schema/interface-relationships.test.ts b/packages/graphql/tests/schema/interface-relationships.test.ts index 98de6ad8c7..83069f46c7 100644 --- a/packages/graphql/tests/schema/interface-relationships.test.ts +++ b/packages/graphql/tests/schema/interface-relationships.test.ts @@ -100,9 +100,10 @@ describe("Interface Relationships", () => { } input ActedInUpdateInput { - screenTime: Int + screenTime: Int @deprecated(reason: \\"Please use the explicit _SET field\\") screenTime_DECREMENT: Int screenTime_INCREMENT: Int + screenTime_SET: Int } input ActedInWhere { @@ -273,7 +274,8 @@ describe("Interface Relationships", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -396,10 +398,12 @@ describe("Interface Relationships", () => { } input MovieUpdateInput { - runtime: Int + runtime: Int @deprecated(reason: \\"Please use the explicit _SET field\\") runtime_DECREMENT: Int runtime_INCREMENT: Int - title: String + runtime_SET: Int + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -492,7 +496,8 @@ describe("Interface Relationships", () => { } input ProductionUpdateInput { - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input ProductionWhere { @@ -574,10 +579,12 @@ describe("Interface Relationships", () => { } input SeriesUpdateInput { - episodes: Int + episodes: Int @deprecated(reason: \\"Please use the explicit _SET field\\") episodes_DECREMENT: Int episodes_INCREMENT: Int - title: String + episodes_SET: Int + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input SeriesWhere { @@ -727,9 +734,10 @@ describe("Interface Relationships", () => { } input ActedInUpdateInput { - screenTime: Int + screenTime: Int @deprecated(reason: \\"Please use the explicit _SET field\\") screenTime_DECREMENT: Int screenTime_INCREMENT: Int + screenTime_SET: Int } input ActedInWhere { @@ -915,7 +923,8 @@ describe("Interface Relationships", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -1175,9 +1184,10 @@ describe("Interface Relationships", () => { } input EpisodeUpdateInput { - runtime: Int + runtime: Int @deprecated(reason: \\"Please use the explicit _SET field\\") runtime_DECREMENT: Int runtime_INCREMENT: Int + runtime_SET: Int series: EpisodeSeriesUpdateFieldInput } @@ -1337,10 +1347,12 @@ describe("Interface Relationships", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - runtime: Int + runtime: Int @deprecated(reason: \\"Please use the explicit _SET field\\") runtime_DECREMENT: Int runtime_INCREMENT: Int - title: String + runtime_SET: Int + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -1618,7 +1630,8 @@ describe("Interface Relationships", () => { input ProductionUpdateInput { actors: [ProductionActorsUpdateFieldInput!] - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input ProductionWhere { @@ -1942,11 +1955,13 @@ describe("Interface Relationships", () => { input SeriesUpdateInput { actors: [SeriesActorsUpdateFieldInput!] - episodeCount: Int + episodeCount: Int @deprecated(reason: \\"Please use the explicit _SET field\\") episodeCount_DECREMENT: Int episodeCount_INCREMENT: Int + episodeCount_SET: Int episodes: [SeriesEpisodesUpdateFieldInput!] - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input SeriesWhere { @@ -2154,9 +2169,10 @@ describe("Interface Relationships", () => { } input ActedInUpdateInput { - screenTime: Int + screenTime: Int @deprecated(reason: \\"Please use the explicit _SET field\\") screenTime_DECREMENT: Int screenTime_INCREMENT: Int + screenTime_SET: Int } input ActedInWhere { @@ -2342,7 +2358,8 @@ describe("Interface Relationships", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -2602,9 +2619,10 @@ describe("Interface Relationships", () => { } input EpisodeUpdateInput { - runtime: Int + runtime: Int @deprecated(reason: \\"Please use the explicit _SET field\\") runtime_DECREMENT: Int runtime_INCREMENT: Int + runtime_SET: Int series: EpisodeSeriesUpdateFieldInput } @@ -2764,10 +2782,12 @@ describe("Interface Relationships", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - runtime: Int + runtime: Int @deprecated(reason: \\"Please use the explicit _SET field\\") runtime_DECREMENT: Int runtime_INCREMENT: Int - title: String + runtime_SET: Int + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -3065,7 +3085,8 @@ describe("Interface Relationships", () => { input ProductionUpdateInput { actors: [ProductionActorsUpdateFieldInput!] - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input ProductionWhere { @@ -3389,11 +3410,13 @@ describe("Interface Relationships", () => { input SeriesUpdateInput { actors: [SeriesActorsUpdateFieldInput!] - episodeCount: Int + episodeCount: Int @deprecated(reason: \\"Please use the explicit _SET field\\") episodeCount_DECREMENT: Int episodeCount_INCREMENT: Int + episodeCount_SET: Int episodes: [SeriesEpisodesUpdateFieldInput!] - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input SeriesWhere { @@ -3516,9 +3539,10 @@ describe("Interface Relationships", () => { } input StarredInUpdateInput { - seasons: Int + seasons: Int @deprecated(reason: \\"Please use the explicit _SET field\\") seasons_DECREMENT: Int seasons_INCREMENT: Int + seasons_SET: Int } input StarredInWhere { @@ -3800,7 +3824,8 @@ describe("Interface Relationships", () => { } input Interface1UpdateInput { - field1: String + field1: String @deprecated(reason: \\"Please use the explicit _SET field\\") + field1_SET: String interface2: [Interface1Interface2UpdateFieldInput!] } @@ -3901,7 +3926,8 @@ describe("Interface Relationships", () => { } input Interface2UpdateInput { - field2: String + field2: String @deprecated(reason: \\"Please use the explicit _SET field\\") + field2_SET: String } input Interface2Where { @@ -4234,7 +4260,8 @@ describe("Interface Relationships", () => { } input Type1Interface1UpdateInput { - field1: String + field1: String @deprecated(reason: \\"Please use the explicit _SET field\\") + field1_SET: String interface2: [Type1Interface1Interface2UpdateFieldInput!] } @@ -4324,7 +4351,8 @@ describe("Interface Relationships", () => { } input Type1Interface2UpdateInput { - field2: String + field2: String @deprecated(reason: \\"Please use the explicit _SET field\\") + field2_SET: String } input Type1Interface2Where { @@ -4362,7 +4390,8 @@ describe("Interface Relationships", () => { } input Type1UpdateInput { - field1: String + field1: String @deprecated(reason: \\"Please use the explicit _SET field\\") + field1_SET: String interface1: [Type1Interface1UpdateFieldInput!] } @@ -4529,7 +4558,8 @@ describe("Interface Relationships", () => { } input Type2Interface1UpdateInput { - field1: String + field1: String @deprecated(reason: \\"Please use the explicit _SET field\\") + field1_SET: String interface2: [Type2Interface1Interface2UpdateFieldInput!] } @@ -4619,7 +4649,8 @@ describe("Interface Relationships", () => { } input Type2Interface2UpdateInput { - field2: String + field2: String @deprecated(reason: \\"Please use the explicit _SET field\\") + field2_SET: String } input Type2Interface2Where { @@ -4976,7 +5007,8 @@ describe("Interface Relationships", () => { } input Interface1UpdateInput { - field1: String + field1: String @deprecated(reason: \\"Please use the explicit _SET field\\") + field1_SET: String interface2: [Interface1Interface2UpdateFieldInput!] } @@ -5077,7 +5109,8 @@ describe("Interface Relationships", () => { } input Interface2UpdateInput { - field2: String + field2: String @deprecated(reason: \\"Please use the explicit _SET field\\") + field2_SET: String } input Interface2Where { @@ -5169,9 +5202,10 @@ describe("Interface Relationships", () => { } input PropsUpdateInput { - propsField: Int + propsField: Int @deprecated(reason: \\"Please use the explicit _SET field\\") propsField_DECREMENT: Int propsField_INCREMENT: Int + propsField_SET: Int } input PropsWhere { @@ -5481,7 +5515,8 @@ describe("Interface Relationships", () => { } input Type1Interface1UpdateInput { - field1: String + field1: String @deprecated(reason: \\"Please use the explicit _SET field\\") + field1_SET: String interface2: [Type1Interface1Interface2UpdateFieldInput!] } @@ -5571,7 +5606,8 @@ describe("Interface Relationships", () => { } input Type1Interface2UpdateInput { - field2: String + field2: String @deprecated(reason: \\"Please use the explicit _SET field\\") + field2_SET: String } input Type1Interface2Where { @@ -5609,7 +5645,8 @@ describe("Interface Relationships", () => { } input Type1UpdateInput { - field1: String + field1: String @deprecated(reason: \\"Please use the explicit _SET field\\") + field1_SET: String interface1: [Type1Interface1UpdateFieldInput!] } @@ -5785,7 +5822,8 @@ describe("Interface Relationships", () => { } input Type2Interface1UpdateInput { - field1: String + field1: String @deprecated(reason: \\"Please use the explicit _SET field\\") + field1_SET: String interface2: [Type2Interface1Interface2UpdateFieldInput!] } @@ -5875,7 +5913,8 @@ describe("Interface Relationships", () => { } input Type2Interface2UpdateInput { - field2: String + field2: String @deprecated(reason: \\"Please use the explicit _SET field\\") + field2_SET: String } input Type2Interface2Where { @@ -6258,7 +6297,8 @@ describe("Interface Relationships", () => { } input Interface1UpdateInput { - field1: String + field1: String @deprecated(reason: \\"Please use the explicit _SET field\\") + field1_SET: String interface2: [Interface1Interface2UpdateFieldInput!] } @@ -6359,7 +6399,8 @@ describe("Interface Relationships", () => { } input Interface2UpdateInput { - field2: String + field2: String @deprecated(reason: \\"Please use the explicit _SET field\\") + field2_SET: String } input Interface2Where { @@ -6701,7 +6742,8 @@ describe("Interface Relationships", () => { } input Type1Interface1UpdateInput { - field1: String + field1: String @deprecated(reason: \\"Please use the explicit _SET field\\") + field1_SET: String interface2: [Type1Interface1Interface2UpdateFieldInput!] } @@ -6791,7 +6833,8 @@ describe("Interface Relationships", () => { } input Type1Interface2UpdateInput { - field2: String + field2: String @deprecated(reason: \\"Please use the explicit _SET field\\") + field2_SET: String } input Type1Interface2Where { @@ -6864,9 +6907,10 @@ describe("Interface Relationships", () => { } input Type1PropsUpdateInput { - type1Field: Int + type1Field: Int @deprecated(reason: \\"Please use the explicit _SET field\\") type1Field_DECREMENT: Int type1Field_INCREMENT: Int + type1Field_SET: Int } input Type1PropsWhere { @@ -6890,7 +6934,8 @@ describe("Interface Relationships", () => { } input Type1UpdateInput { - field1: String + field1: String @deprecated(reason: \\"Please use the explicit _SET field\\") + field1_SET: String interface1: [Type1Interface1UpdateFieldInput!] } @@ -7066,7 +7111,8 @@ describe("Interface Relationships", () => { } input Type2Interface1UpdateInput { - field1: String + field1: String @deprecated(reason: \\"Please use the explicit _SET field\\") + field1_SET: String interface2: [Type2Interface1Interface2UpdateFieldInput!] } @@ -7156,7 +7202,8 @@ describe("Interface Relationships", () => { } input Type2Interface2UpdateInput { - field2: String + field2: String @deprecated(reason: \\"Please use the explicit _SET field\\") + field2_SET: String } input Type2Interface2Where { @@ -7220,9 +7267,10 @@ describe("Interface Relationships", () => { } input Type2PropsUpdateInput { - type2Field: Int + type2Field: Int @deprecated(reason: \\"Please use the explicit _SET field\\") type2Field_DECREMENT: Int type2Field_INCREMENT: Int + type2Field_SET: Int } input Type2PropsWhere { @@ -7568,9 +7616,11 @@ describe("Interface Relationships", () => { } input CommentUpdateInput { - content: String + content: String @deprecated(reason: \\"Please use the explicit _SET field\\") + content_SET: String creator: CommentCreatorUpdateFieldInput - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID post: CommentPostUpdateFieldInput } @@ -7774,9 +7824,11 @@ describe("Interface Relationships", () => { } input ContentUpdateInput { - content: String + content: String @deprecated(reason: \\"Please use the explicit _SET field\\") + content_SET: String creator: ContentCreatorUpdateFieldInput - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input ContentWhere { @@ -8114,9 +8166,11 @@ describe("Interface Relationships", () => { input PostUpdateInput { comments: [PostCommentsUpdateFieldInput!] - content: String + content: String @deprecated(reason: \\"Please use the explicit _SET field\\") + content_SET: String creator: PostCreatorUpdateFieldInput - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } type PostUserCreatorAggregationSelection { @@ -8407,8 +8461,10 @@ describe("Interface Relationships", () => { input UserUpdateInput { content: [UserContentUpdateFieldInput!] - id: ID - name: String + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input UserWhere { @@ -8553,9 +8609,10 @@ describe("Interface Relationships", () => { } input ActedInUpdateInput { - screenTime: Int + screenTime: Int @deprecated(reason: \\"Please use the explicit _SET field\\") screenTime_DECREMENT: Int screenTime_INCREMENT: Int + screenTime_SET: Int } input ActedInWhere { @@ -8741,7 +8798,8 @@ describe("Interface Relationships", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -8952,10 +9010,12 @@ describe("Interface Relationships", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - runtime: Int + runtime: Int @deprecated(reason: \\"Please use the explicit _SET field\\") runtime_DECREMENT: Int runtime_INCREMENT: Int - title: String + runtime_SET: Int + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -9234,10 +9294,12 @@ describe("Interface Relationships", () => { input SeriesUpdateInput { actors: [SeriesActorsUpdateFieldInput!] - episodeCount: Int + episodeCount: Int @deprecated(reason: \\"Please use the explicit _SET field\\") episodeCount_DECREMENT: Int episodeCount_INCREMENT: Int - title: String + episodeCount_SET: Int + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input SeriesWhere { @@ -9506,7 +9568,8 @@ describe("Interface Relationships", () => { input ShowUpdateInput { actors: [ShowActorsUpdateFieldInput!] - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input ShowWhere { @@ -9604,9 +9667,10 @@ describe("Interface Relationships", () => { } input StarredInUpdateInput { - episodeNr: Int + episodeNr: Int @deprecated(reason: \\"Please use the explicit _SET field\\") episodeNr_DECREMENT: Int episodeNr_INCREMENT: Int + episodeNr_SET: Int } input StarredInWhere { diff --git a/packages/graphql/tests/schema/interfaces.test.ts b/packages/graphql/tests/schema/interfaces.test.ts index 61ab4dc60d..fccefd9072 100644 --- a/packages/graphql/tests/schema/interfaces.test.ts +++ b/packages/graphql/tests/schema/interfaces.test.ts @@ -344,7 +344,8 @@ describe("Interfaces", () => { } input MovieUpdateInput { - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID movies: [MovieMoviesUpdateFieldInput!] } @@ -763,7 +764,8 @@ describe("Interfaces", () => { } input MovieUpdateInput { - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID movies: [MovieMoviesUpdateFieldInput!] } diff --git a/packages/graphql/tests/schema/issues/1038.test.ts b/packages/graphql/tests/schema/issues/1038.test.ts index 6792fc6eed..dd3a671e10 100644 --- a/packages/graphql/tests/schema/issues/1038.test.ts +++ b/packages/graphql/tests/schema/issues/1038.test.ts @@ -83,8 +83,10 @@ describe("https://github.com/neo4j/graphql/issues/1038", () => { } input AWSAccountUpdateInput { - accountName: String - code: String + accountName: String @deprecated(reason: \\"Please use the explicit _SET field\\") + accountName_SET: String + code: String @deprecated(reason: \\"Please use the explicit _SET field\\") + code_SET: String } input AWSAccountWhere { @@ -168,8 +170,10 @@ describe("https://github.com/neo4j/graphql/issues/1038", () => { } input DNSZoneUpdateInput { - awsId: String - zoneType: String + awsId: String @deprecated(reason: \\"Please use the explicit _SET field\\") + awsId_SET: String + zoneType: String @deprecated(reason: \\"Please use the explicit _SET field\\") + zoneType_SET: String } input DNSZoneWhere { diff --git a/packages/graphql/tests/schema/issues/1182.test.ts b/packages/graphql/tests/schema/issues/1182.test.ts index 90464c6306..ce7ed217fc 100644 --- a/packages/graphql/tests/schema/issues/1182.test.ts +++ b/packages/graphql/tests/schema/issues/1182.test.ts @@ -96,9 +96,12 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { } input ActorUpdateInput { - dob: DateTime - homeAddress: PointInput - name: String + dob: DateTime @deprecated(reason: \\"Please use the explicit _SET field\\") + dob_SET: DateTime + homeAddress: PointInput @deprecated(reason: \\"Please use the explicit _SET field\\") + homeAddress_SET: PointInput + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -347,7 +350,8 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { diff --git a/packages/graphql/tests/schema/issues/1614.test.ts b/packages/graphql/tests/schema/issues/1614.test.ts index 5bb43f19b1..7c1d856474 100644 --- a/packages/graphql/tests/schema/issues/1614.test.ts +++ b/packages/graphql/tests/schema/issues/1614.test.ts @@ -246,7 +246,8 @@ describe("https://github.com/neo4j/graphql/issues/1614", () => { } input CrewPositionUpdateInput { - position: CrewPositionType + position: CrewPositionType @deprecated(reason: \\"Please use the explicit _SET field\\") + position_SET: CrewPositionType } input CrewPositionWhere { @@ -305,7 +306,8 @@ describe("https://github.com/neo4j/graphql/issues/1614", () => { } input MovieUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input MovieWhere { diff --git a/packages/graphql/tests/schema/issues/162.test.ts b/packages/graphql/tests/schema/issues/162.test.ts index d674893bae..a48df520e5 100644 --- a/packages/graphql/tests/schema/issues/162.test.ts +++ b/packages/graphql/tests/schema/issues/162.test.ts @@ -435,7 +435,8 @@ describe("162", () => { } input TigerJawLevel2Part1UpdateInput { - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID tiger: TigerJawLevel2Part1TigerUpdateFieldInput } @@ -477,7 +478,8 @@ describe("162", () => { } input TigerJawLevel2UpdateInput { - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID part1: TigerJawLevel2Part1UpdateFieldInput } @@ -519,9 +521,10 @@ describe("162", () => { } input TigerUpdateInput { - x: Int + x: Int @deprecated(reason: \\"Please use the explicit _SET field\\") x_DECREMENT: Int x_INCREMENT: Int + x_SET: Int } input TigerWhere { diff --git a/packages/graphql/tests/schema/issues/200.test.ts b/packages/graphql/tests/schema/issues/200.test.ts index d3bec17a9e..4cc57132db 100644 --- a/packages/graphql/tests/schema/issues/200.test.ts +++ b/packages/graphql/tests/schema/issues/200.test.ts @@ -91,11 +91,14 @@ describe("200", () => { } input CategoryUpdateInput { - description: String - exampleImageLocations: [String!] + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + exampleImageLocations: [String!] @deprecated(reason: \\"Please use the explicit _SET field\\") exampleImageLocations_POP: Int exampleImageLocations_PUSH: [String!] - name: String + exampleImageLocations_SET: [String!] + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input CategoryWhere { diff --git a/packages/graphql/tests/schema/issues/2187.test.ts b/packages/graphql/tests/schema/issues/2187.test.ts index 4ff0e84b3f..591fe6905f 100644 --- a/packages/graphql/tests/schema/issues/2187.test.ts +++ b/packages/graphql/tests/schema/issues/2187.test.ts @@ -281,7 +281,8 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { input GenreUpdateInput { movies: [GenreMoviesUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input GenreWhere { @@ -500,15 +501,18 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { input MovieUpdateInput { genres: [MovieGenresUpdateFieldInput!] @deprecated(reason: \\"Do not use genre\\") - imdbRating: Float + imdbRating: Float @deprecated(reason: \\"Please use the explicit _SET field\\") imdbRating_ADD: Float imdbRating_DIVIDE: Float imdbRating_MULTIPLY: Float + imdbRating_SET: Float imdbRating_SUBTRACT: Float title: String @deprecated(reason: \\"Do not use title\\") - year: Int + title_SET: String @deprecated(reason: \\"Do not use title\\") + year: Int @deprecated(reason: \\"Please use the explicit _SET field\\") year_DECREMENT: Int year_INCREMENT: Int + year_SET: Int } input MovieWhere { diff --git a/packages/graphql/tests/schema/issues/2377.test.ts b/packages/graphql/tests/schema/issues/2377.test.ts index 8ad8d5e696..2758c3ade0 100644 --- a/packages/graphql/tests/schema/issues/2377.test.ts +++ b/packages/graphql/tests/schema/issues/2377.test.ts @@ -445,15 +445,22 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { input ResourceUpdateInput { containedBy: [ResourceContainedByUpdateFieldInput!] - createdAt: DateTime - externalIds: [ID!] + createdAt: DateTime @deprecated(reason: \\"Please use the explicit _SET field\\") + createdAt_SET: DateTime + externalIds: [ID!] @deprecated(reason: \\"Please use the explicit _SET field\\") externalIds_POP: Int externalIds_PUSH: [ID!] - id: ID - name: String - properties: [Property!] - tags: [Tag!] - type: ResourceType + externalIds_SET: [ID!] + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String + properties: [Property!] @deprecated(reason: \\"Please use the explicit _SET field\\") + properties_SET: [Property!] + tags: [Tag!] @deprecated(reason: \\"Please use the explicit _SET field\\") + tags_SET: [Tag!] + type: ResourceType @deprecated(reason: \\"Please use the explicit _SET field\\") + type_SET: ResourceType } input ResourceWhere { diff --git a/packages/graphql/tests/schema/issues/2969.test.ts b/packages/graphql/tests/schema/issues/2969.test.ts index ab78b3aa2a..b6868e9c4f 100644 --- a/packages/graphql/tests/schema/issues/2969.test.ts +++ b/packages/graphql/tests/schema/issues/2969.test.ts @@ -252,7 +252,8 @@ describe("https://github.com/neo4j/graphql/issues/2969", () => { input PostUpdateInput { author: PostAuthorUpdateFieldInput - content: String + content: String @deprecated(reason: \\"Please use the explicit _SET field\\") + content_SET: String } type PostUserAuthorAggregationSelection { @@ -489,8 +490,10 @@ describe("https://github.com/neo4j/graphql/issues/2969", () => { } input UserUpdateInput { - id: ID - name: String + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String posts: [UserPostsUpdateFieldInput!] } diff --git a/packages/graphql/tests/schema/issues/2981.test.ts b/packages/graphql/tests/schema/issues/2981.test.ts index 45a2dbfe5a..1bb2e133b5 100644 --- a/packages/graphql/tests/schema/issues/2981.test.ts +++ b/packages/graphql/tests/schema/issues/2981.test.ts @@ -302,7 +302,8 @@ describe("https://github.com/neo4j/graphql/issues/2981", () => { input BookTitle_ENUpdateInput { book: BookTitle_ENBookUpdateFieldInput - value: String + value: String @deprecated(reason: \\"Please use the explicit _SET field\\") + value_SET: String } input BookTitle_ENWhere { @@ -494,7 +495,8 @@ describe("https://github.com/neo4j/graphql/issues/2981", () => { input BookTitle_SVUpdateInput { book: BookTitle_SVBookUpdateFieldInput - value: String + value: String @deprecated(reason: \\"Please use the explicit _SET field\\") + value_SET: String } input BookTitle_SVWhere { @@ -642,8 +644,10 @@ describe("https://github.com/neo4j/graphql/issues/2981", () => { } input BookUpdateInput { - isbn: String - originalTitle: String + isbn: String @deprecated(reason: \\"Please use the explicit _SET field\\") + isbn_SET: String + originalTitle: String @deprecated(reason: \\"Please use the explicit _SET field\\") + originalTitle_SET: String translatedTitle: BookTranslatedTitleUpdateInput } diff --git a/packages/graphql/tests/schema/issues/2993.test.ts b/packages/graphql/tests/schema/issues/2993.test.ts index eedcc3afa0..bff1777511 100644 --- a/packages/graphql/tests/schema/issues/2993.test.ts +++ b/packages/graphql/tests/schema/issues/2993.test.ts @@ -108,7 +108,8 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { } input FOLLOWSUpdateInput { - since: DateTime + since: DateTime @deprecated(reason: \\"Please use the explicit _SET field\\") + since_SET: DateTime } input FOLLOWSWhere { @@ -189,8 +190,10 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { } input ProfileUpdateInput { - id: ID - userName: String + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + userName: String @deprecated(reason: \\"Please use the explicit _SET field\\") + userName_SET: String } input ProfileWhere { @@ -422,7 +425,8 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { input UserUpdateInput { following: [UserFollowingUpdateFieldInput!] - userName: String + userName: String @deprecated(reason: \\"Please use the explicit _SET field\\") + userName_SET: String } input UserWhere { diff --git a/packages/graphql/tests/schema/issues/3428.test.ts b/packages/graphql/tests/schema/issues/3428.test.ts index b75d9dc140..2250158568 100644 --- a/packages/graphql/tests/schema/issues/3428.test.ts +++ b/packages/graphql/tests/schema/issues/3428.test.ts @@ -189,7 +189,8 @@ describe("Relationship nested operations", () => { } input MovieUpdateInput { - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { @@ -296,7 +297,8 @@ describe("Relationship nested operations", () => { } input PersonUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonWhere { @@ -490,7 +492,8 @@ describe("Relationship nested operations", () => { } input MovieUpdateInput { - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { @@ -592,7 +595,8 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonOneWhere { @@ -648,7 +652,8 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - nameTwo: String + nameTwo: String @deprecated(reason: \\"Please use the explicit _SET field\\") + nameTwo_SET: String } input PersonTwoWhere { diff --git a/packages/graphql/tests/schema/issues/3439.test.ts b/packages/graphql/tests/schema/issues/3439.test.ts index 8c1a7e5166..7b9917e215 100644 --- a/packages/graphql/tests/schema/issues/3439.test.ts +++ b/packages/graphql/tests/schema/issues/3439.test.ts @@ -310,7 +310,8 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } input GenreUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String product: [GenreProductUpdateFieldInput!] } @@ -467,8 +468,10 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } input IProductUpdateInput { - id: String - name: String + id: String @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input IProductWhere { @@ -681,8 +684,10 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { input MovieUpdateInput { genre: MovieGenreUpdateFieldInput - id: String - name: String + id: String @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } type MovieUpdatedEvent { @@ -948,8 +953,10 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { input SeriesUpdateInput { genre: SeriesGenreUpdateFieldInput - id: String - name: String + id: String @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } type SeriesUpdatedEvent { @@ -1313,7 +1320,8 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } input GenreUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String product: [GenreProductUpdateFieldInput!] } @@ -1416,8 +1424,10 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } input IProductUpdateInput { - id: String - name: String + id: String @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input IProductWhere { @@ -1630,8 +1640,10 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { input MovieUpdateInput { genre: MovieGenreUpdateFieldInput - id: String - name: String + id: String @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } type MovieUpdatedEvent { @@ -1894,8 +1906,10 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { input SeriesUpdateInput { genre: SeriesGenreUpdateFieldInput - id: String - name: String + id: String @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } type SeriesUpdatedEvent { @@ -2270,7 +2284,8 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } input GenreUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String product: [GenreProductUpdateFieldInput!] } @@ -2549,8 +2564,10 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { input IProductUpdateInput { genre: IProductGenreUpdateFieldInput - id: String - name: String + id: String @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input IProductWhere { @@ -2765,9 +2782,10 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } input MoviePropsUpdateInput { - year: Int + year: Int @deprecated(reason: \\"Please use the explicit _SET field\\") year_DECREMENT: Int year_INCREMENT: Int + year_SET: Int } input MoviePropsWhere { @@ -2811,8 +2829,10 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { input MovieUpdateInput { genre: MovieGenreUpdateFieldInput - id: String - name: String + id: String @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } type MovieUpdatedEvent { @@ -3067,9 +3087,10 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } input SeriesPropsUpdateInput { - episodes: Int + episodes: Int @deprecated(reason: \\"Please use the explicit _SET field\\") episodes_DECREMENT: Int episodes_INCREMENT: Int + episodes_SET: Int } input SeriesPropsWhere { @@ -3113,8 +3134,10 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { input SeriesUpdateInput { genre: SeriesGenreUpdateFieldInput - id: String - name: String + id: String @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } type SeriesUpdatedEvent { @@ -3501,7 +3524,8 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } input GenreUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String product: [GenreProductUpdateFieldInput!] } @@ -3799,8 +3823,10 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { input IProductUpdateInput { genre: IProductGenreUpdateInput - id: String - name: String + id: String @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input IProductWhere { @@ -3983,9 +4009,10 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } input MoviePropsUpdateInput { - year: Int + year: Int @deprecated(reason: \\"Please use the explicit _SET field\\") year_DECREMENT: Int year_INCREMENT: Int + year_SET: Int } input MoviePropsWhere { @@ -4029,8 +4056,10 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { input MovieUpdateInput { genre: MovieGenreUpdateInput - id: String - name: String + id: String @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } type MovieUpdatedEvent { @@ -4316,9 +4345,10 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } input RatingUpdateInput { - number: Int + number: Int @deprecated(reason: \\"Please use the explicit _SET field\\") number_DECREMENT: Int number_INCREMENT: Int + number_SET: Int product: [RatingProductUpdateFieldInput!] } @@ -4525,9 +4555,10 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } input SeriesPropsUpdateInput { - episodes: Int + episodes: Int @deprecated(reason: \\"Please use the explicit _SET field\\") episodes_DECREMENT: Int episodes_INCREMENT: Int + episodes_SET: Int } input SeriesPropsWhere { @@ -4571,8 +4602,10 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { input SeriesUpdateInput { genre: SeriesGenreUpdateInput - id: String - name: String + id: String @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } type SeriesUpdatedEvent { diff --git a/packages/graphql/tests/schema/issues/3537.test.ts b/packages/graphql/tests/schema/issues/3537.test.ts index 84ded4e3c5..c31a6e4db5 100644 --- a/packages/graphql/tests/schema/issues/3537.test.ts +++ b/packages/graphql/tests/schema/issues/3537.test.ts @@ -102,8 +102,10 @@ describe("Extending the schema in when using getSubgraphSchema", () => { } input ActorUpdateInput { - password: String - username: String + password: String @deprecated(reason: \\"Please use the explicit _SET field\\") + password_SET: String + username: String @deprecated(reason: \\"Please use the explicit _SET field\\") + username_SET: String } input ActorWhere { @@ -186,7 +188,8 @@ describe("Extending the schema in when using getSubgraphSchema", () => { } input MovieUpdateInput { - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -594,8 +597,10 @@ describe("Extending the schema in when using getSubgraphSchema", () => { } input ActorUpdateInput { - password: String - username: String + password: String @deprecated(reason: \\"Please use the explicit _SET field\\") + password_SET: String + username: String @deprecated(reason: \\"Please use the explicit _SET field\\") + username_SET: String } type ActorUpdatedEvent { @@ -714,7 +719,8 @@ describe("Extending the schema in when using getSubgraphSchema", () => { } input MovieUpdateInput { - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } type MovieUpdatedEvent { diff --git a/packages/graphql/tests/schema/issues/3541.test.ts b/packages/graphql/tests/schema/issues/3541.test.ts index 508ee230ce..bc36a41487 100644 --- a/packages/graphql/tests/schema/issues/3541.test.ts +++ b/packages/graphql/tests/schema/issues/3541.test.ts @@ -394,7 +394,8 @@ describe("Extending the schema in when using getSubgraphSchema", () => { } input ActorUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -560,8 +561,10 @@ describe("Extending the schema in when using getSubgraphSchema", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id: ID - title: String + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { diff --git a/packages/graphql/tests/schema/issues/3698.test.ts b/packages/graphql/tests/schema/issues/3698.test.ts index d5e2405ec1..39d0453e6b 100644 --- a/packages/graphql/tests/schema/issues/3698.test.ts +++ b/packages/graphql/tests/schema/issues/3698.test.ts @@ -319,7 +319,8 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { } input GenreUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String product: [GenreProductUpdateFieldInput!] } @@ -423,9 +424,12 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { } input IProductUpdateInput { - id: String - info: String - name: String + id: String @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: String + info: String @deprecated(reason: \\"Please use the explicit _SET field\\") + info_SET: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input IProductWhere { @@ -645,8 +649,10 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { input MovieUpdateInput { genre: MovieGenreUpdateFieldInput - id: String - name: String + id: String @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } type MovieUpdatedEvent { @@ -1053,7 +1059,8 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { } input GenreUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String product: [GenreProductUpdateFieldInput!] } @@ -1259,9 +1266,12 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { input IProductUpdateInput { genre: IProductGenreUpdateFieldInput - id: String - info: String - name: String + id: String @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: String + info: String @deprecated(reason: \\"Please use the explicit _SET field\\") + info_SET: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input IProductWhere { @@ -1452,8 +1462,10 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { input MovieUpdateInput { genre: MovieGenreUpdateFieldInput - id: String - name: String + id: String @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } type MovieUpdatedEvent { @@ -1873,7 +1885,8 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { } input GenreUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String product: [GenreProductUpdateFieldInput!] } @@ -2081,9 +2094,12 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { input IProductUpdateInput { genre: IProductGenreUpdateFieldInput - id: String - info: String - name: String + id: String @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: String + info: String @deprecated(reason: \\"Please use the explicit _SET field\\") + info_SET: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input IProductWhere { @@ -2274,8 +2290,10 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { input MovieUpdateInput { genre: MovieGenreUpdateFieldInput - id: String - name: String + id: String @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } type MovieUpdatedEvent { @@ -2517,9 +2535,12 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { input SeriesUpdateInput { genre: SeriesGenreUpdateFieldInput - id: String - info: String - name: String + id: String @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: String + info: String @deprecated(reason: \\"Please use the explicit _SET field\\") + info_SET: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } type SeriesUpdatedEvent { diff --git a/packages/graphql/tests/schema/issues/3816.test.ts b/packages/graphql/tests/schema/issues/3816.test.ts index aeb2100456..f5f3f2fcdc 100644 --- a/packages/graphql/tests/schema/issues/3816.test.ts +++ b/packages/graphql/tests/schema/issues/3816.test.ts @@ -228,7 +228,8 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { input GenreUpdateInput { movies: [GenreMoviesUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input GenreWhere { @@ -411,7 +412,8 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { input MovieUpdateInput { genre: MovieGenreUpdateFieldInput - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input MovieWhere { @@ -687,7 +689,8 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { input GenreUpdateInput { movies: [GenreMoviesUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input GenreWhere { @@ -840,7 +843,8 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { } input MovieUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input MovieWhere { diff --git a/packages/graphql/tests/schema/issues/3817.test.ts b/packages/graphql/tests/schema/issues/3817.test.ts index 4c44b712e4..e38af26a57 100644 --- a/packages/graphql/tests/schema/issues/3817.test.ts +++ b/packages/graphql/tests/schema/issues/3817.test.ts @@ -116,7 +116,8 @@ describe("ttps://github.com/neo4j/graphql/issues/3817", () => { } input FriendOfUpdateInput { - id: String + id: String @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: String } input FriendOfWhere { diff --git a/packages/graphql/tests/schema/issues/4511.test.ts b/packages/graphql/tests/schema/issues/4511.test.ts index bfe2711afc..4cb6a3c30d 100644 --- a/packages/graphql/tests/schema/issues/4511.test.ts +++ b/packages/graphql/tests/schema/issues/4511.test.ts @@ -362,8 +362,10 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { input MovieUpdateInput { director: MovieDirectorUpdateFieldInput - id: ID - title: String + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -672,7 +674,8 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { input ProductionUpdateInput { director: ProductionDirectorUpdateFieldInput - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input ProductionWhere { @@ -869,11 +872,14 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { input SeriesUpdateInput { director: SeriesDirectorUpdateFieldInput - episode: Int + episode: Int @deprecated(reason: \\"Please use the explicit _SET field\\") episode_DECREMENT: Int episode_INCREMENT: Int - id: ID - title: String + episode_SET: Int + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } type SeriesUpdatedEvent { diff --git a/packages/graphql/tests/schema/issues/4615.test.ts b/packages/graphql/tests/schema/issues/4615.test.ts index 8c5142e6e5..28f390e08d 100644 --- a/packages/graphql/tests/schema/issues/4615.test.ts +++ b/packages/graphql/tests/schema/issues/4615.test.ts @@ -108,9 +108,10 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { } input ActedInUpdateInput { - screenTime: Int + screenTime: Int @deprecated(reason: \\"Please use the explicit _SET field\\") screenTime_DECREMENT: Int screenTime_INCREMENT: Int + screenTime_SET: Int } input ActedInWhere { @@ -296,7 +297,8 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -519,11 +521,14 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - release: DateTime - runtime: Int + release: DateTime @deprecated(reason: \\"Please use the explicit _SET field\\") + release_SET: DateTime + runtime: Int @deprecated(reason: \\"Please use the explicit _SET field\\") runtime_DECREMENT: Int runtime_INCREMENT: Int - title: String + runtime_SET: Int + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -751,10 +756,12 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { input SeriesUpdateInput { actors: [SeriesActorsUpdateFieldInput!] - episodes: Int + episodes: Int @deprecated(reason: \\"Please use the explicit _SET field\\") episodes_DECREMENT: Int episodes_INCREMENT: Int - title: String + episodes_SET: Int + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input SeriesWhere { @@ -1003,7 +1010,8 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { input ShowUpdateInput { actors: [ShowActorsUpdateFieldInput!] - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input ShowWhere { diff --git a/packages/graphql/tests/schema/issues/5428.test.ts b/packages/graphql/tests/schema/issues/5428.test.ts index d60591c766..a25c614f7e 100644 --- a/packages/graphql/tests/schema/issues/5428.test.ts +++ b/packages/graphql/tests/schema/issues/5428.test.ts @@ -135,7 +135,8 @@ describe("https://github.com/neo4j/graphql/issues/5428", () => { } input TestUpdateInput { - Name: String + Name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + Name_SET: String } input TestWhere { diff --git a/packages/graphql/tests/schema/issues/609.test.ts b/packages/graphql/tests/schema/issues/609.test.ts index 680f49c9c2..6af0e722cd 100644 --- a/packages/graphql/tests/schema/issues/609.test.ts +++ b/packages/graphql/tests/schema/issues/609.test.ts @@ -95,6 +95,7 @@ describe("609", () => { input DeprecatedUpdateInput { deprecatedField: String @deprecated + deprecatedField_SET: String @deprecated } input DeprecatedWhere { diff --git a/packages/graphql/tests/schema/issues/872.test.ts b/packages/graphql/tests/schema/issues/872.test.ts index f13024c830..cb33a1bed5 100644 --- a/packages/graphql/tests/schema/issues/872.test.ts +++ b/packages/graphql/tests/schema/issues/872.test.ts @@ -210,7 +210,8 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { input Actor2UpdateInput { movies: [Actor2MoviesUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input Actor2Where { @@ -403,7 +404,8 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -527,7 +529,8 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { } input MovieUpdateInput { - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { diff --git a/packages/graphql/tests/schema/lowercase-type-names.test.ts b/packages/graphql/tests/schema/lowercase-type-names.test.ts index df15ec4cd3..9c269855e3 100644 --- a/packages/graphql/tests/schema/lowercase-type-names.test.ts +++ b/packages/graphql/tests/schema/lowercase-type-names.test.ts @@ -363,12 +363,15 @@ describe("lower case type names", () => { } input actorUpdateInput { - createdAt: DateTime + createdAt: DateTime @deprecated(reason: \\"Please use the explicit _SET field\\") + createdAt_SET: DateTime movies: [actorMoviesUpdateFieldInput!] - name: String - year: Int + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String + year: Int @deprecated(reason: \\"Please use the explicit _SET field\\") year_DECREMENT: Int year_INCREMENT: Int + year_SET: Int } input actorWhere { @@ -625,12 +628,16 @@ describe("lower case type names", () => { input movieUpdateInput { actors: [movieActorsUpdateFieldInput!] - createdAt: DateTime - name: String - testId: String - year: Int + createdAt: DateTime @deprecated(reason: \\"Please use the explicit _SET field\\") + createdAt_SET: DateTime + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String + testId: String @deprecated(reason: \\"Please use the explicit _SET field\\") + testId_SET: String + year: Int @deprecated(reason: \\"Please use the explicit _SET field\\") year_DECREMENT: Int year_INCREMENT: Int + year_SET: Int } input movieWhere { diff --git a/packages/graphql/tests/schema/math.test.ts b/packages/graphql/tests/schema/math.test.ts index c9a39f93de..596ac240ea 100644 --- a/packages/graphql/tests/schema/math.test.ts +++ b/packages/graphql/tests/schema/math.test.ts @@ -110,10 +110,12 @@ describe("Algebraic", () => { } input MovieUpdateInput { - id: ID - viewers: Int + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + viewers: Int @deprecated(reason: \\"Please use the explicit _SET field\\") viewers_DECREMENT: Int viewers_INCREMENT: Int + viewers_SET: Int } input MovieWhere { @@ -278,10 +280,12 @@ describe("Algebraic", () => { } input MovieUpdateInput { - id: ID - viewers: BigInt + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + viewers: BigInt @deprecated(reason: \\"Please use the explicit _SET field\\") viewers_DECREMENT: BigInt viewers_INCREMENT: BigInt + viewers_SET: BigInt } input MovieWhere { @@ -442,11 +446,13 @@ describe("Algebraic", () => { } input MovieUpdateInput { - id: ID - viewers: Float + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + viewers: Float @deprecated(reason: \\"Please use the explicit _SET field\\") viewers_ADD: Float viewers_DIVIDE: Float viewers_MULTIPLY: Float + viewers_SET: Float viewers_SUBTRACT: Float } @@ -741,7 +747,8 @@ describe("Algebraic", () => { input DirectorUpdateInput { directs: [DirectorDirectsUpdateFieldInput!] - lastName: String + lastName: String @deprecated(reason: \\"Please use the explicit _SET field\\") + lastName_SET: String } input DirectorWhere { @@ -961,10 +968,12 @@ describe("Algebraic", () => { input MovieUpdateInput { directedBy: MovieDirectedByUpdateFieldInput - id: ID - viewers: Int + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + viewers: Int @deprecated(reason: \\"Please use the explicit _SET field\\") viewers_DECREMENT: Int viewers_INCREMENT: Int + viewers_SET: Int } input MovieWhere { @@ -1175,10 +1184,12 @@ describe("Algebraic", () => { } input MovieUpdateInput { - id: ID - viewers: Int + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + viewers: Int @deprecated(reason: \\"Please use the explicit _SET field\\") viewers_DECREMENT: Int viewers_INCREMENT: Int + viewers_SET: Int workers: [MovieWorkersUpdateFieldInput!] } @@ -1412,7 +1423,8 @@ describe("Algebraic", () => { } input PersonUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String worksInProduction: [PersonWorksInProductionUpdateFieldInput!] } @@ -1591,9 +1603,10 @@ describe("Algebraic", () => { } input ProductionUpdateInput { - viewers: Int + viewers: Int @deprecated(reason: \\"Please use the explicit _SET field\\") viewers_DECREMENT: Int viewers_INCREMENT: Int + viewers_SET: Int } input ProductionWhere { @@ -1736,14 +1749,16 @@ describe("Algebraic", () => { } input ActedInUpdateInput { - pay: Float + pay: Float @deprecated(reason: \\"Please use the explicit _SET field\\") pay_ADD: Float pay_DIVIDE: Float pay_MULTIPLY: Float + pay_SET: Float pay_SUBTRACT: Float - roles: [String!] + roles: [String!] @deprecated(reason: \\"Please use the explicit _SET field\\") roles_POP: Int roles_PUSH: [String!] + roles_SET: [String!] } input ActedInWhere { @@ -1965,7 +1980,8 @@ describe("Algebraic", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -2204,7 +2220,8 @@ describe("Algebraic", () => { input PersonUpdateInput { actedInMovies: [PersonActedInMoviesUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input PersonWhere { diff --git a/packages/graphql/tests/schema/nested-aggregation-on-type.test.ts b/packages/graphql/tests/schema/nested-aggregation-on-type.test.ts index a357c8d671..f5c4529fcc 100644 --- a/packages/graphql/tests/schema/nested-aggregation-on-type.test.ts +++ b/packages/graphql/tests/schema/nested-aggregation-on-type.test.ts @@ -73,9 +73,10 @@ describe("nested aggregation on interface", () => { } input ActedInUpdateInput { - screenTime: Int + screenTime: Int @deprecated(reason: \\"Please use the explicit _SET field\\") screenTime_DECREMENT: Int screenTime_INCREMENT: Int + screenTime_SET: Int } input ActedInWhere { @@ -288,7 +289,8 @@ describe("nested aggregation on interface", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -421,15 +423,18 @@ describe("nested aggregation on interface", () => { } input MovieUpdateInput { - cost: Float + cost: Float @deprecated(reason: \\"Please use the explicit _SET field\\") cost_ADD: Float cost_DIVIDE: Float cost_MULTIPLY: Float + cost_SET: Float cost_SUBTRACT: Float - runtime: Int + runtime: Int @deprecated(reason: \\"Please use the explicit _SET field\\") runtime_DECREMENT: Int runtime_INCREMENT: Int - title: String + runtime_SET: Int + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { diff --git a/packages/graphql/tests/schema/null.test.ts b/packages/graphql/tests/schema/null.test.ts index c2f7ca1ae8..52afbf578b 100644 --- a/packages/graphql/tests/schema/null.test.ts +++ b/packages/graphql/tests/schema/null.test.ts @@ -166,39 +166,52 @@ describe("Null", () => { } input MovieUpdateInput { - actorCount: Int + actorCount: Int @deprecated(reason: \\"Please use the explicit _SET field\\") actorCount_DECREMENT: Int actorCount_INCREMENT: Int - actorCounts: [Int!] + actorCount_SET: Int + actorCounts: [Int!] @deprecated(reason: \\"Please use the explicit _SET field\\") actorCounts_POP: Int actorCounts_PUSH: [Int!] - averageRating: Float + actorCounts_SET: [Int!] + averageRating: Float @deprecated(reason: \\"Please use the explicit _SET field\\") averageRating_ADD: Float averageRating_DIVIDE: Float averageRating_MULTIPLY: Float + averageRating_SET: Float averageRating_SUBTRACT: Float - averageRatings: [Float!] + averageRatings: [Float!] @deprecated(reason: \\"Please use the explicit _SET field\\") averageRatings_POP: Int averageRatings_PUSH: [Float!] - createdAt: DateTime - createdAts: [DateTime!] + averageRatings_SET: [Float!] + createdAt: DateTime @deprecated(reason: \\"Please use the explicit _SET field\\") + createdAt_SET: DateTime + createdAts: [DateTime!] @deprecated(reason: \\"Please use the explicit _SET field\\") createdAts_POP: Int createdAts_PUSH: [DateTime!] - filmedAt: PointInput - filmedAts: [PointInput!] + createdAts_SET: [DateTime!] + filmedAt: PointInput @deprecated(reason: \\"Please use the explicit _SET field\\") + filmedAt_SET: PointInput + filmedAts: [PointInput!] @deprecated(reason: \\"Please use the explicit _SET field\\") filmedAts_POP: Int filmedAts_PUSH: [PointInput!] - id: ID - ids: [ID!] + filmedAts_SET: [PointInput!] + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + ids: [ID!] @deprecated(reason: \\"Please use the explicit _SET field\\") ids_POP: Int ids_PUSH: [ID!] - isActives: [Boolean!] + ids_SET: [ID!] + isActives: [Boolean!] @deprecated(reason: \\"Please use the explicit _SET field\\") isActives_POP: Int isActives_PUSH: [Boolean!] - name: String - names: [String!] + isActives_SET: [Boolean!] + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String + names: [String!] @deprecated(reason: \\"Please use the explicit _SET field\\") names_POP: Int names_PUSH: [String!] + names_SET: [String!] } input MovieWhere { diff --git a/packages/graphql/tests/schema/pluralize-consistency.test.ts b/packages/graphql/tests/schema/pluralize-consistency.test.ts index 4a407c5777..c21c3c5de6 100644 --- a/packages/graphql/tests/schema/pluralize-consistency.test.ts +++ b/packages/graphql/tests/schema/pluralize-consistency.test.ts @@ -179,7 +179,8 @@ describe("Pluralize consistency", () => { } input super_friendUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input super_friendWhere { @@ -328,7 +329,8 @@ describe("Pluralize consistency", () => { input super_userUpdateInput { my_friend: [super_userMy_friendUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input super_userWhere { diff --git a/packages/graphql/tests/schema/query-direction.test.ts b/packages/graphql/tests/schema/query-direction.test.ts index ed0c80226c..b2ca6b7efa 100644 --- a/packages/graphql/tests/schema/query-direction.test.ts +++ b/packages/graphql/tests/schema/query-direction.test.ts @@ -257,7 +257,8 @@ describe("Query Direction", () => { input UserUpdateInput { friends: [UserFriendsUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } type UserUserFriendsAggregationSelection { @@ -548,7 +549,8 @@ describe("Query Direction", () => { input UserUpdateInput { friends: [UserFriendsUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } type UserUserFriendsAggregationSelection { diff --git a/packages/graphql/tests/schema/remove-deprecated/array-methods.test.ts b/packages/graphql/tests/schema/remove-deprecated/array-methods.test.ts index bd52572c3d..e5ba696073 100644 --- a/packages/graphql/tests/schema/remove-deprecated/array-methods.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/array-methods.test.ts @@ -70,9 +70,10 @@ describe("Arrays Methods", () => { } input ActedInUpdateInput { - pay: [Float] + pay: [Float] @deprecated(reason: \\"Please use the explicit _SET field\\") pay_POP: Int pay_PUSH: [Float] + pay_SET: [Float] } input ActedInWhere { @@ -264,7 +265,8 @@ describe("Arrays Methods", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -518,15 +520,18 @@ describe("Arrays Methods", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - averageRating: Float + averageRating: Float @deprecated(reason: \\"Please use the explicit _SET field\\") averageRating_ADD: Float averageRating_DIVIDE: Float averageRating_MULTIPLY: Float + averageRating_SET: Float averageRating_SUBTRACT: Float - id: ID - ratings: [Float!] + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + ratings: [Float!] @deprecated(reason: \\"Please use the explicit _SET field\\") ratings_POP: Int ratings_PUSH: [Float!] + ratings_SET: [Float!] } input MovieWhere { diff --git a/packages/graphql/tests/schema/remove-deprecated/comments.test.ts b/packages/graphql/tests/schema/remove-deprecated/comments.test.ts index 129315bb6e..9840b3b61b 100644 --- a/packages/graphql/tests/schema/remove-deprecated/comments.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/comments.test.ts @@ -177,18 +177,24 @@ describe("Comments", () => { } input MovieUpdateInput { - actorCount: Int + actorCount: Int @deprecated(reason: \\"Please use the explicit _SET field\\") actorCount_DECREMENT: Int actorCount_INCREMENT: Int - averageRating: Float + actorCount_SET: Int + averageRating: Float @deprecated(reason: \\"Please use the explicit _SET field\\") averageRating_ADD: Float averageRating_DIVIDE: Float averageRating_MULTIPLY: Float + averageRating_SET: Float averageRating_SUBTRACT: Float - customScalar: CustomScalar - genre: Genre - id: ID - isActive: Boolean + customScalar: CustomScalar @deprecated(reason: \\"Please use the explicit _SET field\\") + customScalar_SET: CustomScalar + genre: Genre @deprecated(reason: \\"Please use the explicit _SET field\\") + genre_SET: Genre + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + isActive: Boolean @deprecated(reason: \\"Please use the explicit _SET field\\") + isActive_SET: Boolean } input MovieWhere { @@ -339,7 +345,8 @@ describe("Comments", () => { } input ActorUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -535,7 +542,8 @@ describe("Comments", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { @@ -722,9 +730,10 @@ describe("Comments", () => { } input ActedInUpdateInput { - screenTime: Int + screenTime: Int @deprecated(reason: \\"Please use the explicit _SET field\\") screenTime_DECREMENT: Int screenTime_INCREMENT: Int + screenTime_SET: Int } input ActedInWhere { @@ -896,7 +905,8 @@ describe("Comments", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -1019,10 +1029,12 @@ describe("Comments", () => { } input MovieUpdateInput { - runtime: Int + runtime: Int @deprecated(reason: \\"Please use the explicit _SET field\\") runtime_DECREMENT: Int runtime_INCREMENT: Int - title: String + runtime_SET: Int + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -1115,7 +1127,8 @@ describe("Comments", () => { } input ProductionUpdateInput { - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input ProductionWhere { @@ -1197,10 +1210,12 @@ describe("Comments", () => { } input SeriesUpdateInput { - episodes: Int + episodes: Int @deprecated(reason: \\"Please use the explicit _SET field\\") episodes_DECREMENT: Int episodes_INCREMENT: Int - title: String + episodes_SET: Int + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input SeriesWhere { @@ -1352,7 +1367,8 @@ describe("Comments", () => { } input GenreUpdateInput { - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input GenreWhere { @@ -1559,7 +1575,8 @@ describe("Comments", () => { } input MovieUpdateInput { - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID search: MovieSearchUpdateInput } diff --git a/packages/graphql/tests/schema/remove-deprecated/implicit-equality.test.ts b/packages/graphql/tests/schema/remove-deprecated/implicit-equality.test.ts index de1a0b86ed..bc7851a6db 100644 --- a/packages/graphql/tests/schema/remove-deprecated/implicit-equality.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/implicit-equality.test.ts @@ -93,7 +93,8 @@ describe("Implicit Equality filters", () => { } input ActedInUpdateInput { - role: String + role: String @deprecated(reason: \\"Please use the explicit _SET field\\") + role_SET: String } input ActedInWhere { @@ -264,7 +265,8 @@ describe("Implicit Equality filters", () => { input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -502,7 +504,8 @@ describe("Implicit Equality filters", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { diff --git a/packages/graphql/tests/schema/remove-deprecated/implicit-set.test.ts b/packages/graphql/tests/schema/remove-deprecated/implicit-set.test.ts new file mode 100644 index 0000000000..3c6de6053a --- /dev/null +++ b/packages/graphql/tests/schema/remove-deprecated/implicit-set.test.ts @@ -0,0 +1,629 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { printSchemaWithDirectives } from "@graphql-tools/utils"; +import { lexicographicSortSchema } from "graphql/utilities"; +import { Neo4jGraphQL } from "../../../src"; + +describe("Implicit SET field", () => { + test("Should remove implicit _SET field if specified by the setting implicitSET", async () => { + const typeDefs = /* GraphQL */ ` + type Actor @node { + name: String + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") + } + type Movie @node { + id: ID + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") + } + + type ActedIn @relationshipProperties { + role: String + } + `; + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + excludeDeprecatedFields: { + implicitSet: true, + }, + }, + }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\" + The edge properties for the following fields: + * Actor.movies + * Movie.actors + \\"\\"\\" + type ActedIn { + role: String + } + + input ActedInAggregationWhereInput { + AND: [ActedInAggregationWhereInput!] + NOT: ActedInAggregationWhereInput + OR: [ActedInAggregationWhereInput!] + role_AVERAGE_LENGTH_EQUAL: Float + role_AVERAGE_LENGTH_GT: Float + role_AVERAGE_LENGTH_GTE: Float + role_AVERAGE_LENGTH_LT: Float + role_AVERAGE_LENGTH_LTE: Float + role_LONGEST_LENGTH_EQUAL: Int + role_LONGEST_LENGTH_GT: Int + role_LONGEST_LENGTH_GTE: Int + role_LONGEST_LENGTH_LT: Int + role_LONGEST_LENGTH_LTE: Int + role_SHORTEST_LENGTH_EQUAL: Int + role_SHORTEST_LENGTH_GT: Int + role_SHORTEST_LENGTH_GTE: Int + role_SHORTEST_LENGTH_LT: Int + role_SHORTEST_LENGTH_LTE: Int + } + + input ActedInCreateInput { + role: String + } + + input ActedInSort { + role: SortDirection + } + + input ActedInUpdateInput { + role: String @deprecated(reason: \\"Please use the explicit _SET field\\") + role_SET: String + } + + input ActedInWhere { + AND: [ActedInWhere!] + NOT: ActedInWhere + OR: [ActedInWhere!] + role: String @deprecated(reason: \\"Please use the explicit _EQ version\\") + role_CONTAINS: String + role_ENDS_WITH: String + role_EQ: String + role_IN: [String] + role_STARTS_WITH: String + } + + type Actor { + movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + name: String + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelection! + } + + input ActorConnectInput { + movies: [ActorMoviesConnectFieldInput!] + } + + input ActorConnectWhere { + node: ActorWhere! + } + + input ActorCreateInput { + movies: ActorMoviesFieldInput + name: String + } + + input ActorDeleteInput { + movies: [ActorMoviesDeleteFieldInput!] + } + + input ActorDisconnectInput { + movies: [ActorMoviesDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + type ActorMovieMoviesAggregationSelection { + count: Int! + edge: ActorMovieMoviesEdgeAggregateSelection + node: ActorMovieMoviesNodeAggregateSelection + } + + type ActorMovieMoviesEdgeAggregateSelection { + role: StringAggregateSelection! + } + + type ActorMovieMoviesNodeAggregateSelection { + id: IDAggregateSelection! + } + + input ActorMoviesAggregateInput { + AND: [ActorMoviesAggregateInput!] + NOT: ActorMoviesAggregateInput + OR: [ActorMoviesAggregateInput!] + count: Int @deprecated(reason: \\"Please use the explicit _EQ version\\") + count_EQ: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: ActedInAggregationWhereInput + node: ActorMoviesNodeAggregationWhereInput + } + + input ActorMoviesConnectFieldInput { + connect: [MovieConnectInput!] + edge: ActedInCreateInput + where: MovieConnectWhere + } + + type ActorMoviesConnection { + edges: [ActorMoviesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input ActorMoviesConnectionSort { + edge: ActedInSort + node: MovieSort + } + + input ActorMoviesConnectionWhere { + AND: [ActorMoviesConnectionWhere!] + NOT: ActorMoviesConnectionWhere + OR: [ActorMoviesConnectionWhere!] + edge: ActedInWhere + node: MovieWhere + } + + input ActorMoviesCreateFieldInput { + edge: ActedInCreateInput + node: MovieCreateInput! + } + + input ActorMoviesDeleteFieldInput { + delete: MovieDeleteInput + where: ActorMoviesConnectionWhere + } + + input ActorMoviesDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: ActorMoviesConnectionWhere + } + + input ActorMoviesFieldInput { + connect: [ActorMoviesConnectFieldInput!] + create: [ActorMoviesCreateFieldInput!] + } + + input ActorMoviesNodeAggregationWhereInput { + AND: [ActorMoviesNodeAggregationWhereInput!] + NOT: ActorMoviesNodeAggregationWhereInput + OR: [ActorMoviesNodeAggregationWhereInput!] + id_MAX_EQUAL: ID + id_MAX_GT: ID + id_MAX_GTE: ID + id_MAX_LT: ID + id_MAX_LTE: ID + id_MIN_EQUAL: ID + id_MIN_GT: ID + id_MIN_GTE: ID + id_MIN_LT: ID + id_MIN_LTE: ID + } + + type ActorMoviesRelationship { + cursor: String! + node: Movie! + properties: ActedIn! + } + + input ActorMoviesUpdateConnectionInput { + edge: ActedInUpdateInput + node: MovieUpdateInput + } + + input ActorMoviesUpdateFieldInput { + connect: [ActorMoviesConnectFieldInput!] + create: [ActorMoviesCreateFieldInput!] + delete: [ActorMoviesDeleteFieldInput!] + disconnect: [ActorMoviesDisconnectFieldInput!] + update: ActorMoviesUpdateConnectionInput + where: ActorMoviesConnectionWhere + } + + input ActorOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more ActorSort objects to sort Actors by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [ActorSort!] + } + + \\"\\"\\" + Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. + \\"\\"\\" + input ActorSort { + name: SortDirection + } + + input ActorUpdateInput { + movies: [ActorMoviesUpdateFieldInput!] + name_SET: String + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + moviesAggregate: ActorMoviesAggregateInput + \\"\\"\\" + Return Actors where all of the related ActorMoviesConnections match this filter + \\"\\"\\" + moviesConnection_ALL: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorMoviesConnections match this filter + \\"\\"\\" + moviesConnection_NONE: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SINGLE: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorMoviesConnections match this filter + \\"\\"\\" + moviesConnection_SOME: ActorMoviesConnectionWhere + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + movies_ALL: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + movies_NONE: MovieWhere + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + movies_SINGLE: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + movies_SOME: MovieWhere + name: String @deprecated(reason: \\"Please use the explicit _EQ version\\") + name_CONTAINS: String + name_ENDS_WITH: String + name_EQ: String + name_IN: [String] + name_STARTS_WITH: String + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" + type CreateInfo { + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" + type DeleteInfo { + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelection { + longest: ID + shortest: ID + } + + type Movie { + actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + id: ID + } + + type MovieActorActorsAggregationSelection { + count: Int! + edge: MovieActorActorsEdgeAggregateSelection + node: MovieActorActorsNodeAggregateSelection + } + + type MovieActorActorsEdgeAggregateSelection { + role: StringAggregateSelection! + } + + type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelection! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: Int @deprecated(reason: \\"Please use the explicit _EQ version\\") + count_EQ: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: ActedInAggregationWhereInput + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + edge: ActedInCreateInput + where: ActorConnectWhere + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input MovieActorsConnectionSort { + edge: ActedInSort + node: ActorSort + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + edge: ActedInWhere + node: ActorWhere + } + + input MovieActorsCreateFieldInput { + edge: ActedInCreateInput + node: ActorCreateInput! + } + + input MovieActorsDeleteFieldInput { + delete: ActorDeleteInput + where: MovieActorsConnectionWhere + } + + input MovieActorsDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: MovieActorsConnectionWhere + } + + input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + } + + input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name_AVERAGE_LENGTH_EQUAL: Float + name_AVERAGE_LENGTH_GT: Float + name_AVERAGE_LENGTH_GTE: Float + name_AVERAGE_LENGTH_LT: Float + name_AVERAGE_LENGTH_LTE: Float + name_LONGEST_LENGTH_EQUAL: Int + name_LONGEST_LENGTH_GT: Int + name_LONGEST_LENGTH_GTE: Int + name_LONGEST_LENGTH_LT: Int + name_LONGEST_LENGTH_LTE: Int + name_SHORTEST_LENGTH_EQUAL: Int + name_SHORTEST_LENGTH_GT: Int + name_SHORTEST_LENGTH_GTE: Int + name_SHORTEST_LENGTH_LT: Int + name_SHORTEST_LENGTH_LTE: Int + } + + type MovieActorsRelationship { + cursor: String! + node: Actor! + properties: ActedIn! + } + + input MovieActorsUpdateConnectionInput { + edge: ActedInUpdateInput + node: ActorUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelection! + } + + input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + actors: MovieActorsFieldInput + id: ID + } + + input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] + } + + input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + input MovieOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [MovieSort!] + } + + \\"\\"\\" + Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. + \\"\\"\\" + input MovieSort { + id: SortDirection + } + + input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + id_SET: ID + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actorsAggregate: MovieActorsAggregateInput + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + actorsConnection_ALL: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + actorsConnection_NONE: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + actorsConnection_SINGLE: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + actorsConnection_SOME: MovieActorsConnectionWhere + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + actors_ALL: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + actors_NONE: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + actors_SINGLE: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + actors_SOME: ActorWhere + id: ID @deprecated(reason: \\"Please use the explicit _EQ version\\") + id_CONTAINS: ID + id_ENDS_WITH: ID + id_EQ: ID + id_IN: [ID] + id_STARTS_WITH: ID + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + } + + \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" + enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC + } + + type StringAggregateSelection { + longest: String + shortest: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" + type UpdateInfo { + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); + }); +}); diff --git a/packages/graphql/tests/schema/remove-deprecated/options-argument.test.ts b/packages/graphql/tests/schema/remove-deprecated/options-argument.test.ts index 33ff10764a..13309e16b9 100644 --- a/packages/graphql/tests/schema/remove-deprecated/options-argument.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/options-argument.test.ts @@ -116,11 +116,14 @@ describe("Deprecated options argument", () => { } input ActedInUpdateInput { - leadRole: Boolean - screenTime: Int + leadRole: Boolean @deprecated(reason: \\"Please use the explicit _SET field\\") + leadRole_SET: Boolean + screenTime: Int @deprecated(reason: \\"Please use the explicit _SET field\\") screenTime_DECREMENT: Int screenTime_INCREMENT: Int - startDate: Date + screenTime_SET: Int + startDate: Date @deprecated(reason: \\"Please use the explicit _SET field\\") + startDate_SET: Date } input ActedInWhere { @@ -306,7 +309,8 @@ describe("Deprecated options argument", () => { input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -412,7 +416,8 @@ describe("Deprecated options argument", () => { } input GenreUpdateInput { - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input GenreWhere { @@ -606,7 +611,8 @@ describe("Deprecated options argument", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { diff --git a/packages/graphql/tests/schema/scalar.test.ts b/packages/graphql/tests/schema/scalar.test.ts index c5c6b936fa..c79e44c318 100644 --- a/packages/graphql/tests/schema/scalar.test.ts +++ b/packages/graphql/tests/schema/scalar.test.ts @@ -113,10 +113,14 @@ describe("Scalar", () => { } input MovieUpdateInput { - id: ID - myCustomArrayScalar: [CustomScalar!] - myCustomScalar: CustomScalar - myRequiredCustomArrayScalar: [CustomScalar!] + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + myCustomArrayScalar: [CustomScalar!] @deprecated(reason: \\"Please use the explicit _SET field\\") + myCustomArrayScalar_SET: [CustomScalar!] + myCustomScalar: CustomScalar @deprecated(reason: \\"Please use the explicit _SET field\\") + myCustomScalar_SET: CustomScalar + myRequiredCustomArrayScalar: [CustomScalar!] @deprecated(reason: \\"Please use the explicit _SET field\\") + myRequiredCustomArrayScalar_SET: [CustomScalar!] } input MovieWhere { diff --git a/packages/graphql/tests/schema/simple.test.ts b/packages/graphql/tests/schema/simple.test.ts index 0e402f6ac0..b677f9b71f 100644 --- a/packages/graphql/tests/schema/simple.test.ts +++ b/packages/graphql/tests/schema/simple.test.ts @@ -127,16 +127,20 @@ describe("Simple", () => { } input MovieUpdateInput { - actorCount: Int + actorCount: Int @deprecated(reason: \\"Please use the explicit _SET field\\") actorCount_DECREMENT: Int actorCount_INCREMENT: Int - averageRating: Float + actorCount_SET: Int + averageRating: Float @deprecated(reason: \\"Please use the explicit _SET field\\") averageRating_ADD: Float averageRating_DIVIDE: Float averageRating_MULTIPLY: Float + averageRating_SET: Float averageRating_SUBTRACT: Float - id: ID - isActive: Boolean + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + isActive: Boolean @deprecated(reason: \\"Please use the explicit _SET field\\") + isActive_SET: Boolean } input MovieWhere { diff --git a/packages/graphql/tests/schema/string-comparators.test.ts b/packages/graphql/tests/schema/string-comparators.test.ts index cb89e30136..8f7a10aa95 100644 --- a/packages/graphql/tests/schema/string-comparators.test.ts +++ b/packages/graphql/tests/schema/string-comparators.test.ts @@ -106,7 +106,8 @@ describe("String Comparators", () => { } input MovieUpdateInput { - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -254,7 +255,8 @@ describe("String Comparators", () => { } input MovieUpdateInput { - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -407,7 +409,8 @@ describe("String Comparators", () => { } input MovieUpdateInput { - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -557,7 +560,8 @@ describe("String Comparators", () => { } input ActedInUpdateInput { - screenTime: String + screenTime: String @deprecated(reason: \\"Please use the explicit _SET field\\") + screenTime_SET: String } input ActedInWhere { @@ -746,7 +750,8 @@ describe("String Comparators", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -992,7 +997,8 @@ describe("String Comparators", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { diff --git a/packages/graphql/tests/schema/subscriptions.test.ts b/packages/graphql/tests/schema/subscriptions.test.ts index 51c2c08f78..215ce0caf7 100644 --- a/packages/graphql/tests/schema/subscriptions.test.ts +++ b/packages/graphql/tests/schema/subscriptions.test.ts @@ -120,7 +120,8 @@ describe("Subscriptions", () => { } input ActorUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } type ActorUpdatedEvent { @@ -401,17 +402,21 @@ describe("Subscriptions", () => { } input MovieUpdateInput { - actorCount: Int + actorCount: Int @deprecated(reason: \\"Please use the explicit _SET field\\") actorCount_DECREMENT: Int actorCount_INCREMENT: Int + actorCount_SET: Int actors: [MovieActorsUpdateFieldInput!] - averageRating: Float + averageRating: Float @deprecated(reason: \\"Please use the explicit _SET field\\") averageRating_ADD: Float averageRating_DIVIDE: Float averageRating_MULTIPLY: Float + averageRating_SET: Float averageRating_SUBTRACT: Float - id: ID - isActive: Boolean + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + isActive: Boolean @deprecated(reason: \\"Please use the explicit _SET field\\") + isActive_SET: Boolean } type MovieUpdatedEvent { @@ -1053,17 +1058,21 @@ describe("Subscriptions", () => { } input MovieUpdateInput { - actorCount: Int + actorCount: Int @deprecated(reason: \\"Please use the explicit _SET field\\") actorCount_DECREMENT: Int actorCount_INCREMENT: Int + actorCount_SET: Int actors: [MovieActorsUpdateFieldInput!] - averageRating: Float + averageRating: Float @deprecated(reason: \\"Please use the explicit _SET field\\") averageRating_ADD: Float averageRating_DIVIDE: Float averageRating_MULTIPLY: Float + averageRating_SET: Float averageRating_SUBTRACT: Float - id: ID - isActive: Boolean + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + isActive: Boolean @deprecated(reason: \\"Please use the explicit _SET field\\") + isActive_SET: Boolean } type MovieUpdatedEvent { @@ -1539,17 +1548,21 @@ describe("Subscriptions", () => { } input MovieUpdateInput { - actorCount: Int + actorCount: Int @deprecated(reason: \\"Please use the explicit _SET field\\") actorCount_DECREMENT: Int actorCount_INCREMENT: Int + actorCount_SET: Int actors: MovieActorsUpdateInput - averageRating: Float + averageRating: Float @deprecated(reason: \\"Please use the explicit _SET field\\") averageRating_ADD: Float averageRating_DIVIDE: Float averageRating_MULTIPLY: Float + averageRating_SET: Float averageRating_SUBTRACT: Float - id: ID - isActive: Boolean + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + isActive: Boolean @deprecated(reason: \\"Please use the explicit _SET field\\") + isActive_SET: Boolean } type MovieUpdatedEvent { @@ -2251,9 +2264,10 @@ describe("Subscriptions", () => { } input ActedInUpdateInput { - screenTime: Int + screenTime: Int @deprecated(reason: \\"Please use the explicit _SET field\\") screenTime_DECREMENT: Int screenTime_INCREMENT: Int + screenTime_SET: Int } input ActedInWhere { @@ -2756,17 +2770,21 @@ describe("Subscriptions", () => { } input MovieUpdateInput { - actorCount: Int + actorCount: Int @deprecated(reason: \\"Please use the explicit _SET field\\") actorCount_DECREMENT: Int actorCount_INCREMENT: Int + actorCount_SET: Int actors: [MovieActorsUpdateFieldInput!] - averageRating: Float + averageRating: Float @deprecated(reason: \\"Please use the explicit _SET field\\") averageRating_ADD: Float averageRating_DIVIDE: Float averageRating_MULTIPLY: Float + averageRating_SET: Float averageRating_SUBTRACT: Float - id: ID - isActive: Boolean + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + isActive: Boolean @deprecated(reason: \\"Please use the explicit _SET field\\") + isActive_SET: Boolean } type MovieUpdatedEvent { @@ -2996,7 +3014,8 @@ describe("Subscriptions", () => { } input ActorUpdateInput { - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } type ActorUpdatedEvent { @@ -3230,17 +3249,21 @@ describe("Subscriptions", () => { } input MovieUpdateInput { - actorCount: Int + actorCount: Int @deprecated(reason: \\"Please use the explicit _SET field\\") actorCount_DECREMENT: Int actorCount_INCREMENT: Int + actorCount_SET: Int actors: [MovieActorsUpdateFieldInput!] - averageRating: Float + averageRating: Float @deprecated(reason: \\"Please use the explicit _SET field\\") averageRating_ADD: Float averageRating_DIVIDE: Float averageRating_MULTIPLY: Float + averageRating_SET: Float averageRating_SUBTRACT: Float - id: ID - isActive: Boolean + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + isActive: Boolean @deprecated(reason: \\"Please use the explicit _SET field\\") + isActive_SET: Boolean } input MovieWhere { @@ -3584,10 +3607,12 @@ describe("Subscriptions", () => { } input AgreementUpdateInput { - id: Int + id: Int @deprecated(reason: \\"Please use the explicit _SET field\\") id_DECREMENT: Int id_INCREMENT: Int - name: String + id_SET: Int + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String owner: AgreementOwnerUpdateFieldInput } @@ -3772,8 +3797,10 @@ describe("Subscriptions", () => { } input UserUpdateInput { - name: String - username: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String + username: String @deprecated(reason: \\"Please use the explicit _SET field\\") + username_SET: String } input UserWhere { @@ -4144,17 +4171,21 @@ describe("Subscriptions", () => { } input MovieUpdateInput { - actorCount: Int + actorCount: Int @deprecated(reason: \\"Please use the explicit _SET field\\") actorCount_DECREMENT: Int actorCount_INCREMENT: Int + actorCount_SET: Int actors: MovieActorsUpdateInput - averageRating: Float + averageRating: Float @deprecated(reason: \\"Please use the explicit _SET field\\") averageRating_ADD: Float averageRating_DIVIDE: Float averageRating_MULTIPLY: Float + averageRating_SET: Float averageRating_SUBTRACT: Float - id: ID - isActive: Boolean + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + isActive: Boolean @deprecated(reason: \\"Please use the explicit _SET field\\") + isActive_SET: Boolean } type MovieUpdatedEvent { @@ -5103,8 +5134,10 @@ describe("Subscriptions", () => { input MovieUpdateInput { director: MovieDirectorUpdateFieldInput - id: ID - title: String + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -5413,7 +5446,8 @@ describe("Subscriptions", () => { input ProductionUpdateInput { director: ProductionDirectorUpdateFieldInput - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input ProductionWhere { @@ -5610,11 +5644,14 @@ describe("Subscriptions", () => { input SeriesUpdateInput { director: SeriesDirectorUpdateFieldInput - episode: Int + episode: Int @deprecated(reason: \\"Please use the explicit _SET field\\") episode_DECREMENT: Int episode_INCREMENT: Int - id: ID - title: String + episode_SET: Int + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } type SeriesUpdatedEvent { diff --git a/packages/graphql/tests/schema/types/bigint.test.ts b/packages/graphql/tests/schema/types/bigint.test.ts index 2200e7b0f6..cfa692bb60 100644 --- a/packages/graphql/tests/schema/types/bigint.test.ts +++ b/packages/graphql/tests/schema/types/bigint.test.ts @@ -111,10 +111,12 @@ describe("Bigint", () => { } input FileUpdateInput { - name: String - size: BigInt + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String + size: BigInt @deprecated(reason: \\"Please use the explicit _SET field\\") size_DECREMENT: BigInt size_INCREMENT: BigInt + size_SET: BigInt } input FileWhere { diff --git a/packages/graphql/tests/schema/types/date.test.ts b/packages/graphql/tests/schema/types/date.test.ts index 5cbf64306e..c179640df1 100644 --- a/packages/graphql/tests/schema/types/date.test.ts +++ b/packages/graphql/tests/schema/types/date.test.ts @@ -106,8 +106,10 @@ describe("Date", () => { } input MovieUpdateInput { - date: Date - id: ID + date: Date @deprecated(reason: \\"Please use the explicit _SET field\\") + date_SET: Date + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { diff --git a/packages/graphql/tests/schema/types/datetime.test.ts b/packages/graphql/tests/schema/types/datetime.test.ts index 813af011ca..49aeebb1df 100644 --- a/packages/graphql/tests/schema/types/datetime.test.ts +++ b/packages/graphql/tests/schema/types/datetime.test.ts @@ -112,8 +112,10 @@ describe("Datetime", () => { } input MovieUpdateInput { - datetime: DateTime - id: ID + datetime: DateTime @deprecated(reason: \\"Please use the explicit _SET field\\") + datetime_SET: DateTime + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { diff --git a/packages/graphql/tests/schema/types/duration.test.ts b/packages/graphql/tests/schema/types/duration.test.ts index 3697093f0d..31c2485760 100644 --- a/packages/graphql/tests/schema/types/duration.test.ts +++ b/packages/graphql/tests/schema/types/duration.test.ts @@ -112,8 +112,10 @@ describe("Duration", () => { } input MovieUpdateInput { - duration: Duration - id: ID + duration: Duration @deprecated(reason: \\"Please use the explicit _SET field\\") + duration_SET: Duration + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input MovieWhere { diff --git a/packages/graphql/tests/schema/types/localdatetime.test.ts b/packages/graphql/tests/schema/types/localdatetime.test.ts index e4e210e55f..500cfe2898 100644 --- a/packages/graphql/tests/schema/types/localdatetime.test.ts +++ b/packages/graphql/tests/schema/types/localdatetime.test.ts @@ -112,8 +112,10 @@ describe("Localdatetime", () => { } input MovieUpdateInput { - id: ID - localDT: LocalDateTime + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + localDT: LocalDateTime @deprecated(reason: \\"Please use the explicit _SET field\\") + localDT_SET: LocalDateTime } input MovieWhere { diff --git a/packages/graphql/tests/schema/types/localtime.test.ts b/packages/graphql/tests/schema/types/localtime.test.ts index 2a4dd7fabe..0c675a9019 100644 --- a/packages/graphql/tests/schema/types/localtime.test.ts +++ b/packages/graphql/tests/schema/types/localtime.test.ts @@ -114,8 +114,10 @@ describe("Localtime", () => { } input MovieUpdateInput { - id: ID - time: LocalTime + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + time: LocalTime @deprecated(reason: \\"Please use the explicit _SET field\\") + time_SET: LocalTime } input MovieWhere { diff --git a/packages/graphql/tests/schema/types/point.test.ts b/packages/graphql/tests/schema/types/point.test.ts index e5c05fdbaf..dd2801aba1 100644 --- a/packages/graphql/tests/schema/types/point.test.ts +++ b/packages/graphql/tests/schema/types/point.test.ts @@ -93,7 +93,8 @@ describe("Point", () => { } input MovieUpdateInput { - filmedAt: PointInput + filmedAt: PointInput @deprecated(reason: \\"Please use the explicit _SET field\\") + filmedAt_SET: PointInput } input MovieWhere { @@ -280,7 +281,8 @@ describe("Point", () => { } input MachineUpdateInput { - partLocation: CartesianPointInput + partLocation: CartesianPointInput @deprecated(reason: \\"Please use the explicit _SET field\\") + partLocation_SET: CartesianPointInput } input MachineWhere { @@ -407,9 +409,10 @@ describe("Point", () => { } input MovieUpdateInput { - filmedAt: [PointInput!] + filmedAt: [PointInput!] @deprecated(reason: \\"Please use the explicit _SET field\\") filmedAt_POP: Int filmedAt_PUSH: [PointInput!] + filmedAt_SET: [PointInput!] } input MovieWhere { @@ -559,9 +562,10 @@ describe("Point", () => { } input MachineUpdateInput { - partLocations: [CartesianPointInput!] + partLocations: [CartesianPointInput!] @deprecated(reason: \\"Please use the explicit _SET field\\") partLocations_POP: Int partLocations_PUSH: [CartesianPointInput!] + partLocations_SET: [CartesianPointInput!] } input MachineWhere { diff --git a/packages/graphql/tests/schema/types/time.test.ts b/packages/graphql/tests/schema/types/time.test.ts index 51cff3a7f5..bc6c8d27c8 100644 --- a/packages/graphql/tests/schema/types/time.test.ts +++ b/packages/graphql/tests/schema/types/time.test.ts @@ -104,8 +104,10 @@ describe("Time", () => { } input MovieUpdateInput { - id: ID - time: Time + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + time: Time @deprecated(reason: \\"Please use the explicit _SET field\\") + time_SET: Time } input MovieWhere { diff --git a/packages/graphql/tests/schema/union-interface-relationship.test.ts b/packages/graphql/tests/schema/union-interface-relationship.test.ts index 06d36790eb..ccdc309759 100644 --- a/packages/graphql/tests/schema/union-interface-relationship.test.ts +++ b/packages/graphql/tests/schema/union-interface-relationship.test.ts @@ -124,9 +124,10 @@ describe("Union Interface Relationships", () => { } input ActedInUpdateInput { - screenTime: Int + screenTime: Int @deprecated(reason: \\"Please use the explicit _SET field\\") screenTime_DECREMENT: Int screenTime_INCREMENT: Int + screenTime_SET: Int } input ActedInWhere { @@ -336,11 +337,13 @@ describe("Union Interface Relationships", () => { } input ActorUpdateInput { - id: Int + id: Int @deprecated(reason: \\"Please use the explicit _SET field\\") id_DECREMENT: Int id_INCREMENT: Int + id_SET: Int movies: [ActorMoviesUpdateFieldInput!] - name: String + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String } input ActorWhere { @@ -446,9 +449,10 @@ describe("Union Interface Relationships", () => { } input DirectedUpdateInput { - year: Int + year: Int @deprecated(reason: \\"Please use the explicit _SET field\\") year_DECREMENT: Int year_INCREMENT: Int + year_SET: Int } input DirectedWhere { @@ -514,13 +518,16 @@ describe("Union Interface Relationships", () => { } input InfluencerUpdateInput { - reputation: Int + reputation: Int @deprecated(reason: \\"Please use the explicit _SET field\\") reputation_DECREMENT: Int reputation_INCREMENT: Int - reviewerId: Int + reputation_SET: Int + reviewerId: Int @deprecated(reason: \\"Please use the explicit _SET field\\") reviewerId_DECREMENT: Int reviewerId_INCREMENT: Int - url: String + reviewerId_SET: Int + url: String @deprecated(reason: \\"Please use the explicit _SET field\\") + url_SET: String } input InfluencerWhere { @@ -1050,11 +1057,13 @@ describe("Union Interface Relationships", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] directors: MovieDirectorsUpdateInput - imdbId: Int + imdbId: Int @deprecated(reason: \\"Please use the explicit _SET field\\") imdbId_DECREMENT: Int imdbId_INCREMENT: Int + imdbId_SET: Int reviewers: [MovieReviewersUpdateFieldInput!] - title: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { @@ -1387,17 +1396,21 @@ describe("Union Interface Relationships", () => { } input PersonUpdateInput { - id: Int + id: Int @deprecated(reason: \\"Please use the explicit _SET field\\") id_DECREMENT: Int id_INCREMENT: Int + id_SET: Int movies: [PersonMoviesUpdateFieldInput!] - name: String - reputation: Int + name: String @deprecated(reason: \\"Please use the explicit _SET field\\") + name_SET: String + reputation: Int @deprecated(reason: \\"Please use the explicit _SET field\\") reputation_DECREMENT: Int reputation_INCREMENT: Int - reviewerId: Int + reputation_SET: Int + reviewerId: Int @deprecated(reason: \\"Please use the explicit _SET field\\") reviewerId_DECREMENT: Int reviewerId_INCREMENT: Int + reviewerId_SET: Int } input PersonWhere { @@ -1527,9 +1540,10 @@ describe("Union Interface Relationships", () => { } input ReviewUpdateInput { - score: Int + score: Int @deprecated(reason: \\"Please use the explicit _SET field\\") score_DECREMENT: Int score_INCREMENT: Int + score_SET: Int } input ReviewWhere { @@ -1593,12 +1607,14 @@ describe("Union Interface Relationships", () => { } input ReviewerUpdateInput { - reputation: Int + reputation: Int @deprecated(reason: \\"Please use the explicit _SET field\\") reputation_DECREMENT: Int reputation_INCREMENT: Int - reviewerId: Int + reputation_SET: Int + reviewerId: Int @deprecated(reason: \\"Please use the explicit _SET field\\") reviewerId_DECREMENT: Int reviewerId_INCREMENT: Int + reviewerId_SET: Int } input ReviewerWhere { diff --git a/packages/graphql/tests/schema/unions.test.ts b/packages/graphql/tests/schema/unions.test.ts index 425bdfc45f..d5704d5b2e 100644 --- a/packages/graphql/tests/schema/unions.test.ts +++ b/packages/graphql/tests/schema/unions.test.ts @@ -111,7 +111,8 @@ describe("Unions", () => { } input GenreUpdateInput { - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID } input GenreWhere { @@ -318,7 +319,8 @@ describe("Unions", () => { } input MovieUpdateInput { - id: ID + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID search: MovieSearchUpdateInput } diff --git a/packages/graphql/tests/schema/vector.test.ts b/packages/graphql/tests/schema/vector.test.ts index 14d6d70e3e..8969b48cbb 100644 --- a/packages/graphql/tests/schema/vector.test.ts +++ b/packages/graphql/tests/schema/vector.test.ts @@ -135,8 +135,10 @@ describe("@vector schema", () => { } input MovieUpdateInput { - description: String - title: String + description: String @deprecated(reason: \\"Please use the explicit _SET field\\") + description_SET: String + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String } input MovieWhere { diff --git a/packages/graphql/tests/tck/array-methods.test.ts b/packages/graphql/tests/tck/array-methods.test.ts index 75d4a7a158..36b7dc4e28 100644 --- a/packages/graphql/tests/tck/array-methods.test.ts +++ b/packages/graphql/tests/tck/array-methods.test.ts @@ -218,15 +218,15 @@ describe("Arrays Methods", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ + \\"this_update_ratings_PUSH\\": [ + 1 + ], \\"isAuthenticated\\": true, \\"jwt\\": { \\"roles\\": [] }, \\"authorization__before_param2\\": \\"update\\", \\"authorization__after_param2\\": \\"update\\", - \\"this_update_ratings_PUSH\\": [ - 1 - ], \\"resolvedCallbacks\\": {} }" `); @@ -372,16 +372,16 @@ describe("Arrays Methods", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ + \\"this_update_ratings_POP\\": { + \\"low\\": 1, + \\"high\\": 0 + }, \\"isAuthenticated\\": true, \\"jwt\\": { \\"roles\\": [] }, \\"authorization__before_param2\\": \\"update\\", \\"authorization__after_param2\\": \\"update\\", - \\"this_update_ratings_POP\\": { - \\"low\\": 1, - \\"high\\": 0 - }, \\"resolvedCallbacks\\": {} }" `); @@ -461,7 +461,7 @@ describe("Arrays Methods", () => { const query = /* GraphQL */ ` mutation { - updateActors(where: { id_EQ: 1 }, update: { actedIn: [{ update: { edge: { pay_PUSH: 10 } } }] }) { + updateActors(where: { id_EQ: 1 }, update: { actedIn: [{ update: { edge: { pay_PUSH: 10 } } }] }) { actors { name actedIn { 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 0d61da8ae6..8d15186aae 100644 --- a/packages/graphql/tests/tck/connections/relationship_properties/update.test.ts +++ b/packages/graphql/tests/tck/connections/relationship_properties/update.test.ts @@ -119,7 +119,7 @@ describe("Cypher -> Connections -> Relationship Properties -> Update", () => { actors: [ { where: { node: { name_EQ: "Tom Hanks" } } - update: { edge: { screenTime: 60 }, node: { name: "Tom Hanks" } } + update: { edge: { screenTime_SET: 60 }, node: { name_SET: "Tom Hanks" } } } ] } @@ -141,8 +141,8 @@ describe("Cypher -> Connections -> Relationship Properties -> Update", () => { WITH this MATCH (this)<-[this_acted_in0_relationship:ACTED_IN]-(this_actors0:Actor) WHERE this_actors0.name = $updateMovies_args_update_actors0_where_this_actors0param0 - SET this_acted_in0_relationship.screenTime = $updateMovies.args.update.actors[0].update.edge.screenTime - SET this_actors0.name = $this_update_actors0_name + SET this_acted_in0_relationship.screenTime = $updateMovies.args.update.actors[0].update.edge.screenTime_SET + SET this_actors0.name = $this_update_actors0_name_SET RETURN count(*) AS update_this_actors0 } RETURN collect(DISTINCT this { .title }) AS data" @@ -152,7 +152,7 @@ describe("Cypher -> Connections -> Relationship Properties -> Update", () => { "{ \\"param0\\": \\"Forrest Gump\\", \\"updateMovies_args_update_actors0_where_this_actors0param0\\": \\"Tom Hanks\\", - \\"this_update_actors0_name\\": \\"Tom Hanks\\", + \\"this_update_actors0_name_SET\\": \\"Tom Hanks\\", \\"updateMovies\\": { \\"args\\": { \\"update\\": { @@ -165,10 +165,10 @@ describe("Cypher -> Connections -> Relationship Properties -> Update", () => { }, \\"update\\": { \\"node\\": { - \\"name\\": \\"Tom Hanks\\" + \\"name_SET\\": \\"Tom Hanks\\" }, \\"edge\\": { - \\"screenTime\\": { + \\"screenTime_SET\\": { \\"low\\": 60, \\"high\\": 0 } diff --git a/packages/graphql/tests/tck/deprecated/update.test.ts b/packages/graphql/tests/tck/deprecated/update.test.ts new file mode 100644 index 0000000000..fd04432d7c --- /dev/null +++ b/packages/graphql/tests/tck/deprecated/update.test.ts @@ -0,0 +1,995 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Neo4jGraphQL } from "../../../src"; +import { formatCypher, formatParams, translateQuery } from "../utils/tck-test-utils"; + +describe("Cypher Update", () => { + let typeDefs: string; + let neoSchema: Neo4jGraphQL; + + beforeAll(() => { + typeDefs = /* GraphQL */ ` + type Actor @node { + name: String + movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) + } + + type Movie @node { + id: ID + title: String + actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) + } + + type ActedIn @relationshipProperties { + screenTime: Int + } + `; + + neoSchema = new Neo4jGraphQL({ + typeDefs, + }); + }); + + test("Simple Update", async () => { + const query = /* GraphQL */ ` + mutation { + updateMovies(where: { id_EQ: "1" }, update: { id: "2" }) { + movies { + id + } + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE this.id = $param0 + SET this.id = $this_update_id + RETURN collect(DISTINCT this { .id }) AS data" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"1\\", + \\"this_update_id\\": \\"2\\", + \\"resolvedCallbacks\\": {} + }" + `); + }); + + test("Single Nested Update", async () => { + const query = /* GraphQL */ ` + mutation { + updateMovies( + where: { id_EQ: "1" } + update: { + actors: [{ where: { node: { name_EQ: "old name" } }, update: { node: { name: "new name" } } }] + } + ) { + movies { + id + } + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE this.id = $param0 + WITH this + CALL { + WITH this + MATCH (this)<-[this_acted_in0_relationship:ACTED_IN]-(this_actors0:Actor) + WHERE this_actors0.name = $updateMovies_args_update_actors0_where_this_actors0param0 + SET this_actors0.name = $this_update_actors0_name + RETURN count(*) AS update_this_actors0 + } + RETURN collect(DISTINCT this { .id }) AS data" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"1\\", + \\"updateMovies_args_update_actors0_where_this_actors0param0\\": \\"old name\\", + \\"this_update_actors0_name\\": \\"new name\\", + \\"updateMovies\\": { + \\"args\\": { + \\"update\\": { + \\"actors\\": [ + { + \\"where\\": { + \\"node\\": { + \\"name_EQ\\": \\"old name\\" + } + }, + \\"update\\": { + \\"node\\": { + \\"name\\": \\"new name\\" + } + } + } + ] + } + } + }, + \\"resolvedCallbacks\\": {} + }" + `); + }); + + test("Double Nested Update", async () => { + const query = /* GraphQL */ ` + mutation { + updateMovies( + where: { id_EQ: "1" } + update: { + actors: [ + { + where: { node: { name_EQ: "old actor name" } } + update: { + node: { + name: "new actor name" + movies: [ + { + where: { node: { id_EQ: "old movie title" } } + update: { node: { title: "new movie title" } } + } + ] + } + } + } + ] + } + ) { + movies { + id + } + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE this.id = $param0 + WITH this + CALL { + WITH this + MATCH (this)<-[this_acted_in0_relationship:ACTED_IN]-(this_actors0:Actor) + WHERE this_actors0.name = $updateMovies_args_update_actors0_where_this_actors0param0 + SET this_actors0.name = $this_update_actors0_name + WITH this, this_actors0 + CALL { + WITH this, this_actors0 + MATCH (this_actors0)-[this_actors0_acted_in0_relationship:ACTED_IN]->(this_actors0_movies0:Movie) + WHERE this_actors0_movies0.id = $updateMovies_args_update_actors0_update_node_movies0_where_this_actors0_movies0param0 + SET this_actors0_movies0.title = $this_update_actors0_movies0_title + RETURN count(*) AS update_this_actors0_movies0 + } + RETURN count(*) AS update_this_actors0 + } + RETURN collect(DISTINCT this { .id }) AS data" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"1\\", + \\"updateMovies_args_update_actors0_where_this_actors0param0\\": \\"old actor name\\", + \\"this_update_actors0_name\\": \\"new actor name\\", + \\"updateMovies_args_update_actors0_update_node_movies0_where_this_actors0_movies0param0\\": \\"old movie title\\", + \\"this_update_actors0_movies0_title\\": \\"new movie title\\", + \\"updateMovies\\": { + \\"args\\": { + \\"update\\": { + \\"actors\\": [ + { + \\"where\\": { + \\"node\\": { + \\"name_EQ\\": \\"old actor name\\" + } + }, + \\"update\\": { + \\"node\\": { + \\"name\\": \\"new actor name\\", + \\"movies\\": [ + { + \\"where\\": { + \\"node\\": { + \\"id_EQ\\": \\"old movie title\\" + } + }, + \\"update\\": { + \\"node\\": { + \\"title\\": \\"new movie title\\" + } + } + } + ] + } + } + } + ] + } + } + }, + \\"resolvedCallbacks\\": {} + }" + `); + }); + + test("Simple Update as Connect", async () => { + const query = /* GraphQL */ ` + mutation { + updateMovies( + where: { id_EQ: "1" } + update: { actors: { connect: [{ where: { node: { name_EQ: "Daniel" } } }] } } + ) { + movies { + id + } + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE this.id = $param0 + WITH * + CALL { + WITH this + OPTIONAL MATCH (this_actors0_connect0_node:Actor) + WHERE this_actors0_connect0_node.name = $this_actors0_connect0_node_param0 + CALL { + WITH * + WITH collect(this_actors0_connect0_node) as connectedNodes, collect(this) as parentNodes + CALL { + WITH connectedNodes, parentNodes + UNWIND parentNodes as this + UNWIND connectedNodes as this_actors0_connect0_node + MERGE (this)<-[this_actors0_connect0_relationship:ACTED_IN]-(this_actors0_connect0_node) + } + } + WITH this, this_actors0_connect0_node + RETURN count(*) AS connect_this_actors0_connect_Actor0 + } + RETURN collect(DISTINCT this { .id }) AS data" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"1\\", + \\"this_actors0_connect0_node_param0\\": \\"Daniel\\", + \\"resolvedCallbacks\\": {} + }" + `); + }); + + test("Update as multiple Connect", async () => { + const query = /* GraphQL */ ` + mutation { + updateMovies( + where: { id_EQ: "1" } + update: { + actors: { + connect: [ + { where: { node: { name_EQ: "Daniel" } } } + { where: { node: { name_EQ: "Darrell" } } } + ] + } + } + ) { + movies { + id + } + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE this.id = $param0 + WITH * + CALL { + WITH this + OPTIONAL MATCH (this_actors0_connect0_node:Actor) + WHERE this_actors0_connect0_node.name = $this_actors0_connect0_node_param0 + CALL { + WITH * + WITH collect(this_actors0_connect0_node) as connectedNodes, collect(this) as parentNodes + CALL { + WITH connectedNodes, parentNodes + UNWIND parentNodes as this + UNWIND connectedNodes as this_actors0_connect0_node + MERGE (this)<-[this_actors0_connect0_relationship:ACTED_IN]-(this_actors0_connect0_node) + } + } + WITH this, this_actors0_connect0_node + RETURN count(*) AS connect_this_actors0_connect_Actor0 + } + WITH * + CALL { + WITH this + OPTIONAL MATCH (this_actors0_connect1_node:Actor) + WHERE this_actors0_connect1_node.name = $this_actors0_connect1_node_param0 + CALL { + WITH * + WITH collect(this_actors0_connect1_node) as connectedNodes, collect(this) as parentNodes + CALL { + WITH connectedNodes, parentNodes + UNWIND parentNodes as this + UNWIND connectedNodes as this_actors0_connect1_node + MERGE (this)<-[this_actors0_connect1_relationship:ACTED_IN]-(this_actors0_connect1_node) + } + } + WITH this, this_actors0_connect1_node + RETURN count(*) AS connect_this_actors0_connect_Actor1 + } + RETURN collect(DISTINCT this { .id }) AS data" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"1\\", + \\"this_actors0_connect0_node_param0\\": \\"Daniel\\", + \\"this_actors0_connect1_node_param0\\": \\"Darrell\\", + \\"resolvedCallbacks\\": {} + }" + `); + }); + + test("Simple Update as Disconnect", async () => { + const query = /* GraphQL */ ` + mutation { + updateMovies( + where: { id_EQ: "1" } + update: { actors: { disconnect: [{ where: { node: { name_EQ: "Daniel" } } }] } } + ) { + movies { + id + } + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE this.id = $param0 + WITH this + CALL { + WITH this + OPTIONAL MATCH (this)<-[this_actors0_disconnect0_rel:ACTED_IN]-(this_actors0_disconnect0:Actor) + WHERE this_actors0_disconnect0.name = $updateMovies_args_update_actors0_disconnect0_where_Actor_this_actors0_disconnect0param0 + CALL { + WITH this_actors0_disconnect0, this_actors0_disconnect0_rel, this + WITH collect(this_actors0_disconnect0) as this_actors0_disconnect0, this_actors0_disconnect0_rel, this + UNWIND this_actors0_disconnect0 as x + DELETE this_actors0_disconnect0_rel + } + RETURN count(*) AS disconnect_this_actors0_disconnect_Actor + } + RETURN collect(DISTINCT this { .id }) AS data" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"1\\", + \\"updateMovies_args_update_actors0_disconnect0_where_Actor_this_actors0_disconnect0param0\\": \\"Daniel\\", + \\"updateMovies\\": { + \\"args\\": { + \\"update\\": { + \\"actors\\": [ + { + \\"disconnect\\": [ + { + \\"where\\": { + \\"node\\": { + \\"name_EQ\\": \\"Daniel\\" + } + } + } + ] + } + ] + } + } + }, + \\"resolvedCallbacks\\": {} + }" + `); + }); + + test("Update as multiple Disconnect", async () => { + const query = /* GraphQL */ ` + mutation { + updateMovies( + where: { id_EQ: "1" } + update: { + actors: { + disconnect: [ + { where: { node: { name_EQ: "Daniel" } } } + { where: { node: { name_EQ: "Darrell" } } } + ] + } + } + ) { + movies { + id + } + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE this.id = $param0 + WITH this + CALL { + WITH this + OPTIONAL MATCH (this)<-[this_actors0_disconnect0_rel:ACTED_IN]-(this_actors0_disconnect0:Actor) + WHERE this_actors0_disconnect0.name = $updateMovies_args_update_actors0_disconnect0_where_Actor_this_actors0_disconnect0param0 + CALL { + WITH this_actors0_disconnect0, this_actors0_disconnect0_rel, this + WITH collect(this_actors0_disconnect0) as this_actors0_disconnect0, this_actors0_disconnect0_rel, this + UNWIND this_actors0_disconnect0 as x + DELETE this_actors0_disconnect0_rel + } + RETURN count(*) AS disconnect_this_actors0_disconnect_Actor + } + WITH this + CALL { + WITH this + OPTIONAL MATCH (this)<-[this_actors0_disconnect1_rel:ACTED_IN]-(this_actors0_disconnect1:Actor) + WHERE this_actors0_disconnect1.name = $updateMovies_args_update_actors0_disconnect1_where_Actor_this_actors0_disconnect1param0 + CALL { + WITH this_actors0_disconnect1, this_actors0_disconnect1_rel, this + WITH collect(this_actors0_disconnect1) as this_actors0_disconnect1, this_actors0_disconnect1_rel, this + UNWIND this_actors0_disconnect1 as x + DELETE this_actors0_disconnect1_rel + } + RETURN count(*) AS disconnect_this_actors0_disconnect_Actor + } + RETURN collect(DISTINCT this { .id }) AS data" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"1\\", + \\"updateMovies_args_update_actors0_disconnect0_where_Actor_this_actors0_disconnect0param0\\": \\"Daniel\\", + \\"updateMovies_args_update_actors0_disconnect1_where_Actor_this_actors0_disconnect1param0\\": \\"Darrell\\", + \\"updateMovies\\": { + \\"args\\": { + \\"update\\": { + \\"actors\\": [ + { + \\"disconnect\\": [ + { + \\"where\\": { + \\"node\\": { + \\"name_EQ\\": \\"Daniel\\" + } + } + }, + { + \\"where\\": { + \\"node\\": { + \\"name_EQ\\": \\"Darrell\\" + } + } + } + ] + } + ] + } + } + }, + \\"resolvedCallbacks\\": {} + }" + `); + }); + + test("Update an Actor while creating and connecting to a new Movie (via field level)", async () => { + const query = /* GraphQL */ ` + mutation { + updateActors( + where: { name_EQ: "Dan" } + update: { movies: { create: [{ node: { id: "dan_movie_id", title: "The Story of Beer" } }] } } + ) { + actors { + name + movies { + id + title + } + } + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Actor) + WHERE this.name = $param0 + WITH this + CREATE (this_movies0_create0_node:Movie) + SET this_movies0_create0_node.id = $this_movies0_create0_node_id + SET this_movies0_create0_node.title = $this_movies0_create0_node_title + MERGE (this)-[:ACTED_IN]->(this_movies0_create0_node) + WITH * + CALL { + WITH this + MATCH (this)-[update_this0:ACTED_IN]->(update_this1:Movie) + WITH update_this1 { .id, .title } AS update_this1 + RETURN collect(update_this1) AS update_var2 + } + RETURN collect(DISTINCT this { .name, movies: update_var2 }) AS data" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"Dan\\", + \\"this_movies0_create0_node_id\\": \\"dan_movie_id\\", + \\"this_movies0_create0_node_title\\": \\"The Story of Beer\\", + \\"resolvedCallbacks\\": {} + }" + `); + }); + + test("Update an Actor while creating and connecting to a new Movie (via top level)", async () => { + const query = /* GraphQL */ ` + mutation { + updateActors( + where: { name_EQ: "Dan" } + update: { movies: { create: [{ node: { id: "dan_movie_id", title: "The Story of Beer" } }] } } + ) { + actors { + name + movies { + id + title + } + } + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Actor) + WHERE this.name = $param0 + WITH this + CREATE (this_movies0_create0_node:Movie) + SET this_movies0_create0_node.id = $this_movies0_create0_node_id + SET this_movies0_create0_node.title = $this_movies0_create0_node_title + MERGE (this)-[:ACTED_IN]->(this_movies0_create0_node) + WITH * + CALL { + WITH this + MATCH (this)-[update_this0:ACTED_IN]->(update_this1:Movie) + WITH update_this1 { .id, .title } AS update_this1 + RETURN collect(update_this1) AS update_var2 + } + RETURN collect(DISTINCT this { .name, movies: update_var2 }) AS data" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"Dan\\", + \\"this_movies0_create0_node_id\\": \\"dan_movie_id\\", + \\"this_movies0_create0_node_title\\": \\"The Story of Beer\\", + \\"resolvedCallbacks\\": {} + }" + `); + }); + + test("Update an Actor while creating and connecting to multiple new Movies (via top level)", async () => { + const query = /* GraphQL */ ` + mutation { + updateActors( + where: { name_EQ: "Dan" } + update: { + movies: { + create: [ + { node: { id: "dan_movie_id", title: "The Story of Beer" } } + { node: { id: "dan_movie2_id", title: "Forrest Gump" } } + ] + } + } + ) { + actors { + name + movies { + id + title + } + } + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Actor) + WHERE this.name = $param0 + WITH this + CREATE (this_movies0_create0_node:Movie) + SET this_movies0_create0_node.id = $this_movies0_create0_node_id + SET this_movies0_create0_node.title = $this_movies0_create0_node_title + MERGE (this)-[:ACTED_IN]->(this_movies0_create0_node) + CREATE (this_movies0_create1_node:Movie) + SET this_movies0_create1_node.id = $this_movies0_create1_node_id + SET this_movies0_create1_node.title = $this_movies0_create1_node_title + MERGE (this)-[:ACTED_IN]->(this_movies0_create1_node) + WITH * + CALL { + WITH this + MATCH (this)-[update_this0:ACTED_IN]->(update_this1:Movie) + WITH update_this1 { .id, .title } AS update_this1 + RETURN collect(update_this1) AS update_var2 + } + RETURN collect(DISTINCT this { .name, movies: update_var2 }) AS data" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"Dan\\", + \\"this_movies0_create0_node_id\\": \\"dan_movie_id\\", + \\"this_movies0_create0_node_title\\": \\"The Story of Beer\\", + \\"this_movies0_create1_node_id\\": \\"dan_movie2_id\\", + \\"this_movies0_create1_node_title\\": \\"Forrest Gump\\", + \\"resolvedCallbacks\\": {} + }" + `); + }); + + test("Delete related node as update", async () => { + const query = /* GraphQL */ ` + mutation { + updateMovies( + where: { id_EQ: "1" } + update: { + actors: { + delete: { where: { node: { name_EQ: "Actor to delete" }, edge: { screenTime_EQ: 60 } } } + } + } + ) { + movies { + id + } + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE this.id = $param0 + WITH * + CALL { + WITH * + OPTIONAL MATCH (this)<-[this_actors0_delete0_relationship:ACTED_IN]-(this_actors0_delete0:Actor) + WHERE (this_actors0_delete0.name = $updateMovies_args_update_actors0_delete0_where_this_actors0_delete0param0 AND this_actors0_delete0_relationship.screenTime = $updateMovies_args_update_actors0_delete0_where_this_actors0_delete0param1) + WITH this_actors0_delete0_relationship, collect(DISTINCT this_actors0_delete0) AS this_actors0_delete0_to_delete + CALL { + WITH this_actors0_delete0_to_delete + UNWIND this_actors0_delete0_to_delete AS x + DETACH DELETE x + } + } + RETURN collect(DISTINCT this { .id }) AS data" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"1\\", + \\"updateMovies_args_update_actors0_delete0_where_this_actors0_delete0param0\\": \\"Actor to delete\\", + \\"updateMovies_args_update_actors0_delete0_where_this_actors0_delete0param1\\": { + \\"low\\": 60, + \\"high\\": 0 + }, + \\"updateMovies\\": { + \\"args\\": { + \\"update\\": { + \\"actors\\": [ + { + \\"delete\\": [ + { + \\"where\\": { + \\"node\\": { + \\"name_EQ\\": \\"Actor to delete\\" + }, + \\"edge\\": { + \\"screenTime_EQ\\": { + \\"low\\": 60, + \\"high\\": 0 + } + } + } + } + ] + } + ] + } + } + }, + \\"resolvedCallbacks\\": {} + }" + `); + }); + + test("Delete and update nested operations under same mutation", async () => { + const query = /* GraphQL */ ` + mutation { + updateMovies( + where: { id_EQ: "1" } + update: { + actors: { + where: { node: { name_EQ: "Actor to update" } } + update: { node: { name: "Updated name" } } + delete: { where: { node: { name_EQ: "Actor to delete" } } } + } + } + ) { + movies { + id + } + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE this.id = $param0 + WITH * + CALL { + WITH * + OPTIONAL MATCH (this)<-[this_actors0_delete0_relationship:ACTED_IN]-(this_actors0_delete0:Actor) + WHERE this_actors0_delete0.name = $updateMovies_args_update_actors0_delete0_where_this_actors0_delete0param0 + WITH this_actors0_delete0_relationship, collect(DISTINCT this_actors0_delete0) AS this_actors0_delete0_to_delete + CALL { + WITH this_actors0_delete0_to_delete + UNWIND this_actors0_delete0_to_delete AS x + DETACH DELETE x + } + } + WITH this + CALL { + WITH this + MATCH (this)<-[this_acted_in0_relationship:ACTED_IN]-(this_actors0:Actor) + WHERE this_actors0.name = $updateMovies_args_update_actors0_where_this_actors0param0 + SET this_actors0.name = $this_update_actors0_name + RETURN count(*) AS update_this_actors0 + } + RETURN collect(DISTINCT this { .id }) AS data" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"1\\", + \\"updateMovies_args_update_actors0_delete0_where_this_actors0_delete0param0\\": \\"Actor to delete\\", + \\"updateMovies_args_update_actors0_where_this_actors0param0\\": \\"Actor to update\\", + \\"this_update_actors0_name\\": \\"Updated name\\", + \\"updateMovies\\": { + \\"args\\": { + \\"update\\": { + \\"actors\\": [ + { + \\"where\\": { + \\"node\\": { + \\"name_EQ\\": \\"Actor to update\\" + } + }, + \\"update\\": { + \\"node\\": { + \\"name\\": \\"Updated name\\" + } + }, + \\"delete\\": [ + { + \\"where\\": { + \\"node\\": { + \\"name_EQ\\": \\"Actor to delete\\" + } + } + } + ] + } + ] + } + } + }, + \\"resolvedCallbacks\\": {} + }" + `); + }); + + test("Nested delete under a nested update", async () => { + const query = /* GraphQL */ ` + mutation { + updateMovies( + where: { id_EQ: "1" } + update: { actors: { delete: { where: { node: { name_EQ: "Actor to delete" } } } } } + ) { + movies { + id + } + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE this.id = $param0 + WITH * + CALL { + WITH * + OPTIONAL MATCH (this)<-[this_actors0_delete0_relationship:ACTED_IN]-(this_actors0_delete0:Actor) + WHERE this_actors0_delete0.name = $updateMovies_args_update_actors0_delete0_where_this_actors0_delete0param0 + WITH this_actors0_delete0_relationship, collect(DISTINCT this_actors0_delete0) AS this_actors0_delete0_to_delete + CALL { + WITH this_actors0_delete0_to_delete + UNWIND this_actors0_delete0_to_delete AS x + DETACH DELETE x + } + } + RETURN collect(DISTINCT this { .id }) AS data" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"1\\", + \\"updateMovies_args_update_actors0_delete0_where_this_actors0_delete0param0\\": \\"Actor to delete\\", + \\"updateMovies\\": { + \\"args\\": { + \\"update\\": { + \\"actors\\": [ + { + \\"delete\\": [ + { + \\"where\\": { + \\"node\\": { + \\"name_EQ\\": \\"Actor to delete\\" + } + } + } + ] + } + ] + } + } + }, + \\"resolvedCallbacks\\": {} + }" + `); + }); + + test("Double nested delete under a nested update", async () => { + const query = /* GraphQL */ ` + mutation { + updateMovies( + where: { id_EQ: "1" } + update: { + actors: { + delete: { + where: { node: { name_EQ: "Actor to delete" } } + delete: { movies: { where: { node: { id_EQ: "2" } } } } + } + } + } + ) { + movies { + id + } + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE this.id = $param0 + WITH * + CALL { + WITH * + OPTIONAL MATCH (this)<-[this_actors0_delete0_relationship:ACTED_IN]-(this_actors0_delete0:Actor) + WHERE this_actors0_delete0.name = $updateMovies_args_update_actors0_delete0_where_this_actors0_delete0param0 + WITH * + CALL { + WITH * + OPTIONAL MATCH (this_actors0_delete0)-[this_actors0_delete0_movies0_relationship:ACTED_IN]->(this_actors0_delete0_movies0:Movie) + WHERE this_actors0_delete0_movies0.id = $updateMovies_args_update_actors0_delete0_delete_movies0_where_this_actors0_delete0_movies0param0 + WITH this_actors0_delete0_movies0_relationship, collect(DISTINCT this_actors0_delete0_movies0) AS this_actors0_delete0_movies0_to_delete + CALL { + WITH this_actors0_delete0_movies0_to_delete + UNWIND this_actors0_delete0_movies0_to_delete AS x + DETACH DELETE x + } + } + WITH this_actors0_delete0_relationship, collect(DISTINCT this_actors0_delete0) AS this_actors0_delete0_to_delete + CALL { + WITH this_actors0_delete0_to_delete + UNWIND this_actors0_delete0_to_delete AS x + DETACH DELETE x + } + } + RETURN collect(DISTINCT this { .id }) AS data" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"1\\", + \\"updateMovies_args_update_actors0_delete0_where_this_actors0_delete0param0\\": \\"Actor to delete\\", + \\"updateMovies_args_update_actors0_delete0_delete_movies0_where_this_actors0_delete0_movies0param0\\": \\"2\\", + \\"updateMovies\\": { + \\"args\\": { + \\"update\\": { + \\"actors\\": [ + { + \\"delete\\": [ + { + \\"where\\": { + \\"node\\": { + \\"name_EQ\\": \\"Actor to delete\\" + } + }, + \\"delete\\": { + \\"movies\\": [ + { + \\"where\\": { + \\"node\\": { + \\"id_EQ\\": \\"2\\" + } + } + } + ] + } + } + ] + } + ] + } + } + }, + \\"resolvedCallbacks\\": {} + }" + `); + }); +}); 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 98537d6598..1feee4d947 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 @@ -327,7 +327,7 @@ describe("Cypher Auth Allow", () => { test("Update Node", async () => { const query = /* GraphQL */ ` mutation { - updateUsers(where: { id_EQ: "old-id" }, update: { id: "new-id" }) { + updateUsers(where: { id_EQ: "old-id" }, update: { id_SET: "new-id" }) { users { id } @@ -344,7 +344,7 @@ describe("Cypher Auth Allow", () => { "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 this.id = $this_update_id_SET WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN collect(DISTINCT this { .id }) AS data" @@ -360,7 +360,7 @@ describe("Cypher Auth Allow", () => { \\"sub\\": \\"old-id\\" }, \\"param0\\": \\"old-id\\", - \\"this_update_id\\": \\"new-id\\", + \\"this_update_id_SET\\": \\"new-id\\", \\"resolvedCallbacks\\": {} }" `); @@ -369,7 +369,7 @@ describe("Cypher Auth Allow", () => { test("Update Node Property", async () => { const query = /* GraphQL */ ` mutation { - updateUsers(where: { id_EQ: "id-01" }, update: { password: "new-password" }) { + updateUsers(where: { id_EQ: "id-01" }, update: { password_SET: "new-password" }) { users { id } @@ -388,7 +388,7 @@ describe("Cypher Auth Allow", () => { 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 WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) - SET this.password = $this_update_password + SET this.password = $this_update_password_SET WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN collect(DISTINCT this { .id }) AS data" @@ -404,7 +404,7 @@ describe("Cypher Auth Allow", () => { \\"sub\\": \\"id-01\\" }, \\"param0\\": \\"id-01\\", - \\"this_update_password\\": \\"new-password\\", + \\"this_update_password_SET\\": \\"new-password\\", \\"resolvedCallbacks\\": {} }" `); @@ -413,7 +413,10 @@ describe("Cypher Auth Allow", () => { test("Nested Update Node", async () => { const query = /* GraphQL */ ` mutation { - updatePosts(where: { id_EQ: "post-id" }, update: { creator: { update: { node: { id: "new-id" } } } }) { + updatePosts( + where: { id_EQ: "post-id" } + update: { creator: { update: { node: { id_SET: "new-id" } } } } + ) { posts { id } @@ -437,7 +440,7 @@ describe("Cypher Auth Allow", () => { WITH this MATCH (this)<-[this_has_post0_relationship:HAS_POST]-(this_creator0:User) WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this_creator0.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) - SET this_creator0.id = $this_update_creator0_id + SET this_creator0.id = $this_update_creator0_id_SET RETURN count(*) AS update_this_creator0 } WITH * @@ -465,7 +468,7 @@ describe("Cypher Auth Allow", () => { \\"sub\\": \\"user-id\\" }, \\"param0\\": \\"post-id\\", - \\"this_update_creator0_id\\": \\"new-id\\", + \\"this_update_creator0_id_SET\\": \\"new-id\\", \\"resolvedCallbacks\\": {} }" `); @@ -476,7 +479,7 @@ describe("Cypher Auth Allow", () => { mutation { updatePosts( where: { id_EQ: "post-id" } - update: { creator: { update: { node: { password: "new-password" } } } } + update: { creator: { update: { node: { password_SET: "new-password" } } } } ) { posts { id @@ -503,7 +506,7 @@ describe("Cypher Auth Allow", () => { WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this_creator0.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this, this_creator0 WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this_creator0.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) - SET this_creator0.password = $this_update_creator0_password + SET this_creator0.password = $this_update_creator0_password_SET RETURN count(*) AS update_this_creator0 } WITH * @@ -531,7 +534,7 @@ describe("Cypher Auth Allow", () => { \\"sub\\": \\"user-id\\" }, \\"param0\\": \\"post-id\\", - \\"this_update_creator0_password\\": \\"new-password\\", + \\"this_update_creator0_password_SET\\": \\"new-password\\", \\"resolvedCallbacks\\": {} }" `); 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 01a978e818..a06cf409be 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 @@ -206,7 +206,10 @@ describe("@auth allow on specific interface implementation", () => { test("Nested Update Node", async () => { const query = /* GraphQL */ ` mutation { - updateUsers(where: { id_EQ: "user-id" }, update: { content: { update: { node: { id: "new-id" } } } }) { + updateUsers( + where: { id_EQ: "user-id" } + update: { content: { update: { node: { id_SET: "new-id" } } } } + ) { users { id content { @@ -232,7 +235,7 @@ describe("@auth allow on specific interface implementation", () => { CALL { WITH this MATCH (this)-[this_has_content0_relationship:HAS_CONTENT]->(this_content0:Comment) - SET this_content0.id = $this_update_content0_id + SET this_content0.id = $this_update_content0_id_SET WITH this, this_content0 CALL { WITH this_content0 @@ -261,7 +264,7 @@ describe("@auth allow on specific interface implementation", () => { OPTIONAL MATCH (this_content0)<-[:HAS_CONTENT]-(authorization__before_this0:User) WITH *, count(authorization__before_this0) AS creatorCount WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (creatorCount <> 0 AND ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) - SET this_content0.id = $this_update_content0_id + SET this_content0.id = $this_update_content0_id_SET WITH this, this_content0 CALL { WITH this_content0 @@ -308,7 +311,7 @@ describe("@auth allow on specific interface implementation", () => { \\"sub\\": \\"user-id\\" }, \\"param0\\": \\"user-id\\", - \\"this_update_content0_id\\": \\"new-id\\", + \\"this_update_content0_id_SET\\": \\"new-id\\", \\"resolvedCallbacks\\": {} }" `); 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 24ef37b109..025df07d9a 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 @@ -146,7 +146,7 @@ describe("Cypher Auth isAuthenticated", () => { test("Update Node with bind", async () => { const query = /* GraphQL */ ` mutation { - updatePosts(where: { id_EQ: "1" }, update: { id: "id-1" }) { + updatePosts(where: { id_EQ: "1" }, update: { id_SET: "id-1" }) { posts { id } @@ -162,14 +162,14 @@ describe("Cypher Auth isAuthenticated", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Post) WHERE this.id = $param0 - SET this.id = $this_update_id + SET this.id = $this_update_id_SET RETURN collect(DISTINCT this { .id }) AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"param0\\": \\"1\\", - \\"this_update_id\\": \\"id-1\\", + \\"this_update_id_SET\\": \\"id-1\\", \\"resolvedCallbacks\\": {} }" `); @@ -178,7 +178,7 @@ describe("Cypher Auth isAuthenticated", () => { test("Update Node without bind", async () => { const query = /* GraphQL */ ` mutation { - updateComments(where: { id_EQ: "1" }, update: { id: "id-1" }) { + updateComments(where: { id_EQ: "1" }, update: { id_SET: "id-1" }) { comments { id } @@ -194,14 +194,14 @@ describe("Cypher Auth isAuthenticated", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Comment) WHERE this.id = $param0 - SET this.id = $this_update_id + SET this.id = $this_update_id_SET RETURN collect(DISTINCT this { .id }) AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"param0\\": \\"1\\", - \\"this_update_id\\": \\"id-1\\", + \\"this_update_id_SET\\": \\"id-1\\", \\"resolvedCallbacks\\": {} }" `); 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 2259b24692..75b6470a59 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 @@ -230,7 +230,7 @@ describe("Cypher Auth isAuthenticated", () => { test("Update Node", async () => { const query = /* GraphQL */ ` mutation { - updateUsers(where: { id_EQ: "1" }, update: { id: "id-1" }) { + updateUsers(where: { id_EQ: "1" }, update: { id_SET: "id-1" }) { users { id } @@ -246,14 +246,14 @@ describe("Cypher Auth isAuthenticated", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:User) WHERE this.id = $param0 - SET this.id = $this_update_id + SET this.id = $this_update_id_SET RETURN collect(DISTINCT this { .id }) AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"param0\\": \\"1\\", - \\"this_update_id\\": \\"id-1\\", + \\"this_update_id_SET\\": \\"id-1\\", \\"resolvedCallbacks\\": {} }" `); @@ -262,7 +262,7 @@ describe("Cypher Auth isAuthenticated", () => { test("Update Node & Field", async () => { const query = /* GraphQL */ ` mutation { - updateUsers(where: { id_EQ: "1" }, update: { password: "password" }) { + updateUsers(where: { id_EQ: "1" }, update: { password_SET: "password" }) { users { id } @@ -278,14 +278,14 @@ describe("Cypher Auth isAuthenticated", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:User) WHERE this.id = $param0 - SET this.password = $this_update_password + SET this.password = $this_update_password_SET RETURN collect(DISTINCT this { .id }) AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"param0\\": \\"1\\", - \\"this_update_password\\": \\"password\\", + \\"this_update_password_SET\\": \\"password\\", \\"resolvedCallbacks\\": {} }" `); 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 ec47f7b6fd..0e07892a7c 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 @@ -552,7 +552,7 @@ describe("Cypher Auth Where with Roles", () => { test("Update Node", async () => { const query = /* GraphQL */ ` mutation { - updateUsers(update: { name: "Bob" }) { + updateUsers(update: { name_SET: "Bob" }) { users { id } @@ -569,7 +569,7 @@ describe("Cypher Auth Where with Roles", () => { "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 this.name = $this_update_name_SET WITH this 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 $authorization__after_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH * @@ -590,7 +590,7 @@ describe("Cypher Auth Where with Roles", () => { \\"update_param3\\": \\"admin\\", \\"param2\\": \\"user\\", \\"param3\\": \\"admin\\", - \\"this_update_name\\": \\"Bob\\", + \\"this_update_name_SET\\": \\"Bob\\", \\"authorization__after_param2\\": \\"user\\", \\"authorization__after_param3\\": \\"admin\\", \\"resolvedCallbacks\\": {} @@ -601,7 +601,7 @@ describe("Cypher Auth Where with Roles", () => { test("Update Node + User Defined Where", async () => { const query = /* GraphQL */ ` mutation { - updateUsers(where: { name_EQ: "bob" }, update: { name: "Bob" }) { + updateUsers(where: { name_EQ: "bob" }, update: { name_SET: "Bob" }) { users { id } @@ -618,7 +618,7 @@ describe("Cypher Auth Where with Roles", () => { "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 this.name = $this_update_name_SET WITH this 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 $authorization__after_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH * @@ -640,7 +640,7 @@ describe("Cypher Auth Where with Roles", () => { \\"param0\\": \\"bob\\", \\"param3\\": \\"user\\", \\"param4\\": \\"admin\\", - \\"this_update_name\\": \\"Bob\\", + \\"this_update_name_SET\\": \\"Bob\\", \\"authorization__after_param2\\": \\"user\\", \\"authorization__after_param3\\": \\"admin\\", \\"resolvedCallbacks\\": {} @@ -651,7 +651,7 @@ describe("Cypher Auth Where with Roles", () => { test("Update Nested Node", async () => { const query = /* GraphQL */ ` mutation { - updateUsers(update: { posts: { update: { node: { id: "new-id" } } } }) { + updateUsers(update: { posts: { update: { node: { id_SET: "new-id" } } } }) { users { id posts { @@ -676,7 +676,7 @@ describe("Cypher Auth Where with Roles", () => { WITH this MATCH (this)-[this_has_post0_relationship:HAS_POST]->(this_posts0:Post) WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND single(authorization__before_this0 IN [(this_posts0)<-[:HAS_POST]-(authorization__before_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) | 1] WHERE true) AND ($jwt.roles IS NOT NULL AND $authorization__before_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__before_param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) - SET this_posts0.id = $this_update_posts0_id + SET this_posts0.id = $this_update_posts0_id_SET WITH this, this_posts0 WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND single(authorization__after_this0 IN [(this_posts0)<-[:HAS_POST]-(authorization__after_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization__after_this0.id = $jwt.sub) | 1] WHERE true) AND ($jwt.roles IS NOT NULL AND $authorization__after_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this, this_posts0 @@ -721,7 +721,7 @@ describe("Cypher Auth Where with Roles", () => { \\"param3\\": \\"admin\\", \\"authorization__before_param2\\": \\"user\\", \\"authorization__before_param3\\": \\"admin\\", - \\"this_update_posts0_id\\": \\"new-id\\", + \\"this_update_posts0_id_SET\\": \\"new-id\\", \\"authorization__after_param2\\": \\"user\\", \\"authorization__after_param3\\": \\"admin\\", \\"resolvedCallbacks\\": {} 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 5e983fd749..99c7fe30f6 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 @@ -326,7 +326,7 @@ describe("Cypher Auth Roles", () => { test("Update Node", async () => { const query = /* GraphQL */ ` mutation { - updateUsers(where: { id_EQ: "1" }, update: { id: "id-1" }) { + updateUsers(where: { id_EQ: "1" }, update: { id_SET: "id-1" }) { users { id } @@ -343,7 +343,7 @@ describe("Cypher Auth Roles", () => { "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 this.id = $this_update_id_SET WITH this WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH * @@ -363,7 +363,7 @@ describe("Cypher Auth Roles", () => { \\"update_param2\\": \\"admin\\", \\"param0\\": \\"1\\", \\"param3\\": \\"admin\\", - \\"this_update_id\\": \\"id-1\\", + \\"this_update_id_SET\\": \\"id-1\\", \\"authorization__after_param2\\": \\"admin\\", \\"resolvedCallbacks\\": {} }" @@ -373,7 +373,7 @@ describe("Cypher Auth Roles", () => { test("Update Node & Field", async () => { const query = /* GraphQL */ ` mutation { - updateUsers(where: { id_EQ: "1" }, update: { password: "password" }) { + updateUsers(where: { id_EQ: "1" }, update: { password_SET: "password" }) { users { id } @@ -392,7 +392,7 @@ describe("Cypher Auth Roles", () => { 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 WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__before_param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) - SET this.password = $this_update_password + SET this.password = $this_update_password_SET WITH this WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH * @@ -412,7 +412,7 @@ describe("Cypher Auth Roles", () => { \\"update_param2\\": \\"admin\\", \\"param0\\": \\"1\\", \\"param3\\": \\"admin\\", - \\"this_update_password\\": \\"password\\", + \\"this_update_password_SET\\": \\"password\\", \\"authorization__before_param2\\": \\"super-admin\\", \\"authorization__after_param2\\": \\"admin\\", \\"resolvedCallbacks\\": {} 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 ea5770fa72..52aec6f585 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 @@ -262,7 +262,7 @@ describe("Cypher Auth Allow", () => { update: { content: { where: { node: { id_EQ: "post-id" } } - update: { node: { creator: { update: { node: { id: "not bound" } } } } } + update: { node: { creator: { update: { node: { id_SET: "not bound" } } } } } } } ) { @@ -293,7 +293,7 @@ describe("Cypher Auth Allow", () => { CALL { WITH this, this_content0 MATCH (this_content0)<-[this_content0_has_content0_relationship:HAS_CONTENT]-(this_content0_creator0:User) - SET this_content0_creator0.id = $this_update_content0_creator0_id + SET this_content0_creator0.id = $this_update_content0_creator0_id_SET WITH this, this_content0, this_content0_creator0 WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this_content0_creator0.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN count(*) AS update_this_content0_creator0 @@ -321,7 +321,7 @@ describe("Cypher Auth Allow", () => { CALL { WITH this, this_content0 MATCH (this_content0)<-[this_content0_has_content0_relationship:HAS_CONTENT]-(this_content0_creator0:User) - SET this_content0_creator0.id = $this_update_content0_creator0_id + SET this_content0_creator0.id = $this_update_content0_creator0_id_SET WITH this, this_content0, this_content0_creator0 WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this_content0_creator0.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN count(*) AS update_this_content0_creator0 @@ -352,7 +352,7 @@ describe("Cypher Auth Allow", () => { "{ \\"param0\\": \\"id-01\\", \\"updateUsers_args_update_content0_where_this_content0param0\\": \\"post-id\\", - \\"this_update_content0_creator0_id\\": \\"not bound\\", + \\"this_update_content0_creator0_id_SET\\": \\"not bound\\", \\"isAuthenticated\\": true, \\"jwt\\": { \\"roles\\": [ @@ -375,7 +375,7 @@ describe("Cypher Auth Allow", () => { \\"creator\\": { \\"update\\": { \\"node\\": { - \\"id\\": \\"not bound\\" + \\"id_SET\\": \\"not bound\\" } } } 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 95766a0611..aefbff3db7 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 @@ -235,7 +235,7 @@ describe("Cypher Auth Allow", () => { test("Update Node", async () => { const query = /* GraphQL */ ` mutation { - updateUsers(where: { id_EQ: "id-01" }, update: { id: "not bound" }) { + updateUsers(where: { id_EQ: "id-01" }, update: { id_SET: "not bound" }) { users { id } @@ -251,7 +251,7 @@ describe("Cypher Auth Allow", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:User) WHERE this.id = $param0 - SET this.id = $this_update_id + SET this.id = $this_update_id_SET WITH this WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN collect(DISTINCT this { .id }) AS data" @@ -260,7 +260,7 @@ describe("Cypher Auth Allow", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"param0\\": \\"id-01\\", - \\"this_update_id\\": \\"not bound\\", + \\"this_update_id_SET\\": \\"not bound\\", \\"isAuthenticated\\": true, \\"jwt\\": { \\"roles\\": [ @@ -281,7 +281,7 @@ describe("Cypher Auth Allow", () => { update: { posts: { where: { node: { id_EQ: "post-id" } } - update: { node: { creator: { update: { node: { id: "not bound" } } } } } + update: { node: { creator: { update: { node: { id_SET: "not bound" } } } } } } } ) { @@ -309,7 +309,7 @@ describe("Cypher Auth Allow", () => { CALL { WITH this, this_posts0 MATCH (this_posts0)<-[this_posts0_has_post0_relationship:HAS_POST]-(this_posts0_creator0:User) - SET this_posts0_creator0.id = $this_update_posts0_creator0_id + SET this_posts0_creator0.id = $this_update_posts0_creator0_id_SET WITH this, this_posts0, this_posts0_creator0 WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this_posts0_creator0.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN count(*) AS update_this_posts0_creator0 @@ -333,7 +333,7 @@ describe("Cypher Auth Allow", () => { "{ \\"param0\\": \\"id-01\\", \\"updateUsers_args_update_posts0_where_this_posts0param0\\": \\"post-id\\", - \\"this_update_posts0_creator0_id\\": \\"not bound\\", + \\"this_update_posts0_creator0_id_SET\\": \\"not bound\\", \\"isAuthenticated\\": true, \\"jwt\\": { \\"roles\\": [ @@ -356,7 +356,7 @@ describe("Cypher Auth Allow", () => { \\"creator\\": { \\"update\\": { \\"node\\": { - \\"id\\": \\"not bound\\" + \\"id_SET\\": \\"not bound\\" } } } 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 c339e66b5c..1b2e9c68eb 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 @@ -350,7 +350,7 @@ describe("Cypher Auth Where", () => { test("Update Node", async () => { const query = /* GraphQL */ ` mutation { - updatePosts(update: { content: "Bob" }) { + updatePosts(update: { content_SET: "Bob" }) { posts { id } @@ -367,7 +367,7 @@ describe("Cypher Auth Where", () => { WITH *, count(this0) AS creatorCount WITH * WHERE ($isAuthenticated = true AND (creatorCount <> 0 AND ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub))) - SET this.content = $this_update_content + SET this.content = $this_update_content_SET WITH * CALL { WITH this @@ -392,7 +392,7 @@ describe("Cypher Auth Where", () => { ], \\"sub\\": \\"id-01\\" }, - \\"this_update_content\\": \\"Bob\\", + \\"this_update_content_SET\\": \\"Bob\\", \\"resolvedCallbacks\\": {} }" `); @@ -401,7 +401,7 @@ describe("Cypher Auth Where", () => { test("Update Node + User Defined Where", async () => { const query = /* GraphQL */ ` mutation { - updatePosts(where: { content_EQ: "bob" }, update: { content: "Bob" }) { + updatePosts(where: { content_EQ: "bob" }, update: { content_SET: "Bob" }) { posts { id } @@ -418,7 +418,7 @@ describe("Cypher Auth Where", () => { WITH *, count(this0) AS creatorCount WITH * WHERE (this.content = $param0 AND ($isAuthenticated = true AND (creatorCount <> 0 AND ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub)))) - SET this.content = $this_update_content + SET this.content = $this_update_content_SET WITH * CALL { WITH this @@ -444,7 +444,7 @@ describe("Cypher Auth Where", () => { \\"sub\\": \\"id-01\\" }, \\"param0\\": \\"bob\\", - \\"this_update_content\\": \\"Bob\\", + \\"this_update_content_SET\\": \\"Bob\\", \\"resolvedCallbacks\\": {} }" `); @@ -453,7 +453,7 @@ describe("Cypher Auth Where", () => { test("Update Nested Node", async () => { const query = /* GraphQL */ ` mutation { - updateUsers(update: { content: { update: { node: { id: "new-id" } } } }) { + updateUsers(update: { content: { update: { node: { id_SET: "new-id" } } } }) { users { id } @@ -475,7 +475,7 @@ describe("Cypher Auth Where", () => { CALL { WITH this MATCH (this)-[this_has_content0_relationship:HAS_CONTENT]->(this_content0:Comment) - SET this_content0.id = $this_update_content0_id + SET this_content0.id = $this_update_content0_id_SET WITH this, this_content0 CALL { WITH this_content0 @@ -497,7 +497,7 @@ describe("Cypher Auth Where", () => { OPTIONAL MATCH (this_content0)<-[:HAS_CONTENT]-(authorization__before_this0:User) WITH *, count(authorization__before_this0) AS creatorCount WHERE ($isAuthenticated = true AND (creatorCount <> 0 AND ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub))) - SET this_content0.id = $this_update_content0_id + SET this_content0.id = $this_update_content0_id_SET WITH this, this_content0 CALL { WITH this_content0 @@ -524,7 +524,7 @@ describe("Cypher Auth Where", () => { ], \\"sub\\": \\"id-01\\" }, - \\"this_update_content0_id\\": \\"new-id\\", + \\"this_update_content0_id_SET\\": \\"new-id\\", \\"resolvedCallbacks\\": {} }" `); 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 f29a0b5cd3..9063b6d4b2 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 @@ -530,7 +530,7 @@ describe("Cypher Auth Where", () => { test("Update Node", async () => { const query = /* GraphQL */ ` mutation { - updateUsers(update: { name: "Bob" }) { + updateUsers(update: { name_SET: "Bob" }) { users { id } @@ -547,7 +547,7 @@ describe("Cypher Auth Where", () => { "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 this.name = $this_update_name_SET WITH * WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) RETURN collect(DISTINCT this { .id }) AS data" @@ -562,7 +562,7 @@ describe("Cypher Auth Where", () => { ], \\"sub\\": \\"id-01\\" }, - \\"this_update_name\\": \\"Bob\\", + \\"this_update_name_SET\\": \\"Bob\\", \\"resolvedCallbacks\\": {} }" `); @@ -571,7 +571,7 @@ describe("Cypher Auth Where", () => { test("Update Node + User Defined Where", async () => { const query = /* GraphQL */ ` mutation { - updateUsers(where: { name_EQ: "bob" }, update: { name: "Bob" }) { + updateUsers(where: { name_EQ: "bob" }, update: { name_SET: "Bob" }) { users { id } @@ -588,7 +588,7 @@ describe("Cypher Auth Where", () => { "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 this.name = $this_update_name_SET WITH * WHERE ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) RETURN collect(DISTINCT this { .id }) AS data" @@ -604,7 +604,7 @@ describe("Cypher Auth Where", () => { \\"sub\\": \\"id-01\\" }, \\"param0\\": \\"bob\\", - \\"this_update_name\\": \\"Bob\\", + \\"this_update_name_SET\\": \\"Bob\\", \\"resolvedCallbacks\\": {} }" `); @@ -613,7 +613,7 @@ describe("Cypher Auth Where", () => { test("Update Nested Node", async () => { const query = /* GraphQL */ ` mutation { - updateUsers(update: { posts: { update: { node: { id: "new-id" } } } }) { + updateUsers(update: { posts: { update: { node: { id_SET: "new-id" } } } }) { users { id posts { @@ -640,7 +640,7 @@ describe("Cypher Auth Where", () => { OPTIONAL MATCH (this_posts0)<-[:HAS_POST]-(authorization__before_this0:User) WITH *, count(authorization__before_this0) AS creatorCount WHERE ($isAuthenticated = true AND (creatorCount <> 0 AND ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub))) - SET this_posts0.id = $this_update_posts0_id + SET this_posts0.id = $this_update_posts0_id_SET WITH this, this_posts0 CALL { WITH this_posts0 @@ -675,7 +675,7 @@ describe("Cypher Auth Where", () => { ], \\"sub\\": \\"id-01\\" }, - \\"this_update_posts0_id\\": \\"new-id\\", + \\"this_update_posts0_id_SET\\": \\"new-id\\", \\"resolvedCallbacks\\": {} }" `); diff --git a/packages/graphql/tests/tck/directives/authorization/projection.test.ts b/packages/graphql/tests/tck/directives/authorization/projection.test.ts index 5e9c5c2d19..8e63813949 100644 --- a/packages/graphql/tests/tck/directives/authorization/projection.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/projection.test.ts @@ -51,7 +51,7 @@ describe("Cypher Auth Projection", () => { test("Update Node", async () => { const query = /* GraphQL */ ` mutation { - updateUsers(update: { id: "new-id" }) { + updateUsers(update: { id_SET: "new-id" }) { users { id } @@ -68,7 +68,7 @@ describe("Cypher Auth Projection", () => { "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 this.id = $this_update_id_SET WITH * WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN collect(DISTINCT this { .id }) AS data" @@ -83,7 +83,7 @@ describe("Cypher Auth Projection", () => { ], \\"sub\\": \\"super_admin\\" }, - \\"this_update_id\\": \\"new-id\\", + \\"this_update_id_SET\\": \\"new-id\\", \\"resolvedCallbacks\\": {} }" `); diff --git a/packages/graphql/tests/tck/directives/autogenerate.test.ts b/packages/graphql/tests/tck/directives/autogenerate.test.ts index e27227f7a2..18ad6d879d 100644 --- a/packages/graphql/tests/tck/directives/autogenerate.test.ts +++ b/packages/graphql/tests/tck/directives/autogenerate.test.ts @@ -78,7 +78,7 @@ describe("Cypher autogenerate directive", () => { test("Simple Update", async () => { const query = /* GraphQL */ ` mutation { - updateMovies(update: { name: "dan" }) { + updateMovies(update: { name_SET: "dan" }) { movies { id name @@ -91,13 +91,13 @@ describe("Cypher autogenerate directive", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Movie) - SET this.name = $this_update_name + SET this.name = $this_update_name_SET RETURN collect(DISTINCT this { .id, .name }) AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ - \\"this_update_name\\": \\"dan\\", + \\"this_update_name_SET\\": \\"dan\\", \\"resolvedCallbacks\\": {} }" `); 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 5b45229818..2f5bcf11ce 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 @@ -203,7 +203,7 @@ describe("Interface Relationships - Update connect", () => { UNWIND parentNodes as this_actedIn0_connect0_node UNWIND connectedNodes as this_actedIn0_connect0_node_actors0_node MERGE (this_actedIn0_connect0_node)<-[this_actedIn0_connect0_node_actors0_relationship:ACTED_IN]-(this_actedIn0_connect0_node_actors0_node) - SET this_actedIn0_connect0_node_actors0_relationship.screenTime = $this_actedIn0_connect0_node_actors0_relationship_screenTime + SET this_actedIn0_connect0_node_actors0_relationship.screenTime = $this_actedIn0_connect0_node_actors0_relationship_ActedIn_screenTime } } WITH this, this_actedIn0_connect0_node, this_actedIn0_connect0_node_actors0_node @@ -244,7 +244,7 @@ describe("Interface Relationships - Update connect", () => { UNWIND parentNodes as this_actedIn0_connect0_node UNWIND connectedNodes as this_actedIn0_connect0_node_actors0_node MERGE (this_actedIn0_connect0_node)<-[this_actedIn0_connect0_node_actors0_relationship:ACTED_IN]-(this_actedIn0_connect0_node_actors0_node) - SET this_actedIn0_connect0_node_actors0_relationship.screenTime = $this_actedIn0_connect0_node_actors0_relationship_screenTime + SET this_actedIn0_connect0_node_actors0_relationship.screenTime = $this_actedIn0_connect0_node_actors0_relationship_ActedIn_screenTime } } WITH this, this_actedIn0_connect0_node, this_actedIn0_connect0_node_actors0_node @@ -265,7 +265,7 @@ describe("Interface Relationships - Update connect", () => { \\"high\\": 0 }, \\"this_actedIn0_connect0_node_actors0_node_param0\\": \\"Actor\\", - \\"this_actedIn0_connect0_node_actors0_relationship_screenTime\\": { + \\"this_actedIn0_connect0_node_actors0_relationship_ActedIn_screenTime\\": { \\"low\\": 90, \\"high\\": 0 }, 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 b576748d74..5b63b35204 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 @@ -63,7 +63,10 @@ describe("Interface Relationships - Update update", () => { mutation { updateActors( update: { - actedIn: { where: { node: { title_EQ: "Old Title" } }, update: { node: { title: "New Title" } } } + actedIn: { + where: { node: { title_EQ: "Old Title" } } + update: { node: { title_SET: "New Title" } } + } } ) { actors { @@ -85,7 +88,7 @@ describe("Interface Relationships - Update update", () => { WITH this MATCH (this)-[this_acted_in0_relationship:ACTED_IN]->(this_actedIn0:Movie) WHERE this_actedIn0.title = $updateActors_args_update_actedIn0_where_this_actedIn0param0 - SET this_actedIn0.title = $this_update_actedIn0_title + SET this_actedIn0.title = $this_update_actedIn0_title_SET RETURN count(*) AS update_this_actedIn0 } RETURN count(*) AS update_this_Movie @@ -97,7 +100,7 @@ describe("Interface Relationships - Update update", () => { WITH this MATCH (this)-[this_acted_in0_relationship:ACTED_IN]->(this_actedIn0:Series) WHERE this_actedIn0.title = $updateActors_args_update_actedIn0_where_this_actedIn0param0 - SET this_actedIn0.title = $this_update_actedIn0_title + SET this_actedIn0.title = $this_update_actedIn0_title_SET RETURN count(*) AS update_this_actedIn0 } RETURN count(*) AS update_this_Series @@ -108,7 +111,7 @@ describe("Interface Relationships - Update update", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"updateActors_args_update_actedIn0_where_this_actedIn0param0\\": \\"Old Title\\", - \\"this_update_actedIn0_title\\": \\"New Title\\", + \\"this_update_actedIn0_title_SET\\": \\"New Title\\", \\"updateActors\\": { \\"args\\": { \\"update\\": { @@ -121,7 +124,7 @@ describe("Interface Relationships - Update update", () => { }, \\"update\\": { \\"node\\": { - \\"title\\": \\"New Title\\" + \\"title_SET\\": \\"New Title\\" } } } @@ -141,7 +144,7 @@ describe("Interface Relationships - Update update", () => { update: { actedIn: { where: { node: { title_EQ: "Old Title" } } - update: { node: { actors: { update: { node: { name: "New Actor Name" } } } } } + update: { node: { actors: { update: { node: { name_SET: "New Actor Name" } } } } } } } ) { @@ -168,7 +171,7 @@ describe("Interface Relationships - Update update", () => { CALL { WITH this, this_actedIn0 MATCH (this_actedIn0)<-[this_actedIn0_acted_in0_relationship:ACTED_IN]-(this_actedIn0_actors0:Actor) - SET this_actedIn0_actors0.name = $this_update_actedIn0_actors0_name + SET this_actedIn0_actors0.name = $this_update_actedIn0_actors0_name_SET RETURN count(*) AS update_this_actedIn0_actors0 } RETURN count(*) AS update_this_actedIn0 @@ -186,7 +189,7 @@ describe("Interface Relationships - Update update", () => { CALL { WITH this, this_actedIn0 MATCH (this_actedIn0)<-[this_actedIn0_acted_in0_relationship:ACTED_IN]-(this_actedIn0_actors0:Actor) - SET this_actedIn0_actors0.name = $this_update_actedIn0_actors0_name + SET this_actedIn0_actors0.name = $this_update_actedIn0_actors0_name_SET RETURN count(*) AS update_this_actedIn0_actors0 } RETURN count(*) AS update_this_actedIn0 @@ -199,7 +202,7 @@ describe("Interface Relationships - Update update", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"updateActors_args_update_actedIn0_where_this_actedIn0param0\\": \\"Old Title\\", - \\"this_update_actedIn0_actors0_name\\": \\"New Actor Name\\", + \\"this_update_actedIn0_actors0_name_SET\\": \\"New Actor Name\\", \\"updateActors\\": { \\"args\\": { \\"update\\": { @@ -216,7 +219,7 @@ describe("Interface Relationships - Update update", () => { { \\"update\\": { \\"node\\": { - \\"name\\": \\"New Actor Name\\" + \\"name_SET\\": \\"New Actor Name\\" } } } 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 ebd037f235..d8dff96281 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 @@ -189,7 +189,7 @@ describe("Node directive with additionalLabels", () => { test("Update Movie with additional labels", async () => { const query = /* GraphQL */ ` mutation { - updateMovies(where: { id_EQ: "1" }, update: { id: "2" }) { + updateMovies(where: { id_EQ: "1" }, update: { id_SET: "2" }) { movies { id } @@ -202,14 +202,14 @@ describe("Node directive with additionalLabels", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Film:Multimedia) WHERE this.id = $param0 - SET this.id = $this_update_id + SET this.id = $this_update_id_SET RETURN collect(DISTINCT this { .id }) AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"param0\\": \\"1\\", - \\"this_update_id\\": \\"2\\", + \\"this_update_id_SET\\": \\"2\\", \\"resolvedCallbacks\\": {} }" `); 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 3f88b40a6a..18501a87b0 100644 --- a/packages/graphql/tests/tck/directives/node/node-label.test.ts +++ b/packages/graphql/tests/tck/directives/node/node-label.test.ts @@ -240,7 +240,7 @@ describe("Label in Node directive", () => { test("Update Movie with label film", async () => { const query = /* GraphQL */ ` mutation { - updateMovies(where: { id_EQ: "1" }, update: { id: "2" }) { + updateMovies(where: { id_EQ: "1" }, update: { id_SET: "2" }) { movies { id } @@ -253,14 +253,14 @@ describe("Label in Node directive", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Film) WHERE this.id = $param0 - SET this.id = $this_update_id + SET this.id = $this_update_id_SET RETURN collect(DISTINCT this { .id }) AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"param0\\": \\"1\\", - \\"this_update_id\\": \\"2\\", + \\"this_update_id_SET\\": \\"2\\", \\"resolvedCallbacks\\": {} }" `); @@ -272,7 +272,9 @@ describe("Label in Node directive", () => { updateMovies( where: { id_EQ: "1" } update: { - actors: [{ where: { node: { name_EQ: "old name" } }, update: { node: { name: "new name" } } }] + actors: [ + { where: { node: { name_EQ: "old name" } }, update: { node: { name_SET: "new name" } } } + ] } ) { movies { @@ -292,7 +294,7 @@ describe("Label in Node directive", () => { WITH this MATCH (this)<-[this_acted_in0_relationship:ACTED_IN]-(this_actors0:Person) WHERE this_actors0.name = $updateMovies_args_update_actors0_where_this_actors0param0 - SET this_actors0.name = $this_update_actors0_name + SET this_actors0.name = $this_update_actors0_name_SET RETURN count(*) AS update_this_actors0 } RETURN collect(DISTINCT this { .id }) AS data" @@ -302,7 +304,7 @@ describe("Label in Node directive", () => { "{ \\"param0\\": \\"1\\", \\"updateMovies_args_update_actors0_where_this_actors0param0\\": \\"old name\\", - \\"this_update_actors0_name\\": \\"new name\\", + \\"this_update_actors0_name_SET\\": \\"new name\\", \\"updateMovies\\": { \\"args\\": { \\"update\\": { @@ -315,7 +317,7 @@ describe("Label in Node directive", () => { }, \\"update\\": { \\"node\\": { - \\"name\\": \\"new name\\" + \\"name_SET\\": \\"new name\\" } } } diff --git a/packages/graphql/tests/tck/directives/plural.test.ts b/packages/graphql/tests/tck/directives/plural.test.ts index 374d4ace69..f65f1de0a7 100644 --- a/packages/graphql/tests/tck/directives/plural.test.ts +++ b/packages/graphql/tests/tck/directives/plural.test.ts @@ -116,7 +116,7 @@ describe("Plural directive", () => { test("Update Tech with plural techs using aggregation", async () => { const query = /* GraphQL */ ` mutation { - updateTechs(update: { name: "Matrix" }) { + updateTechs(update: { name_SET: "Matrix" }) { techs { name } @@ -128,13 +128,13 @@ describe("Plural directive", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Tech) - SET this.name = $this_update_name + SET this.name = $this_update_name_SET RETURN collect(DISTINCT this { .name }) AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ - \\"this_update_name\\": \\"Matrix\\", + \\"this_update_name_SET\\": \\"Matrix\\", \\"resolvedCallbacks\\": {} }" `); diff --git a/packages/graphql/tests/tck/issues/2782.test.ts b/packages/graphql/tests/tck/issues/2782.test.ts index 437a2cb4dd..7ee3095582 100644 --- a/packages/graphql/tests/tck/issues/2782.test.ts +++ b/packages/graphql/tests/tck/issues/2782.test.ts @@ -54,8 +54,8 @@ describe("https://github.com/neo4j/graphql/issues/2782", () => { mutation { updateProducts( update: { - id: "123" - name: "Nested Connect" + id_SET: "123" + name_SET: "Nested Connect" colors: { disconnect: [ { @@ -96,8 +96,8 @@ describe("https://github.com/neo4j/graphql/issues/2782", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Product) - SET this.id = $this_update_id - SET this.name = $this_update_name + SET this.id = $this_update_id_SET + SET this.name = $this_update_name_SET WITH this CALL { WITH this @@ -190,8 +190,8 @@ describe("https://github.com/neo4j/graphql/issues/2782", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ - \\"this_update_id\\": \\"123\\", - \\"this_update_name\\": \\"Nested Connect\\", + \\"this_update_id_SET\\": \\"123\\", + \\"this_update_name_SET\\": \\"Nested Connect\\", \\"updateProducts_args_update_colors0_disconnect0_where_Color_this_colors0_disconnect0param0\\": \\"Red\\", \\"updateProducts_args_update_colors0_disconnect0_disconnect_photos0_where_Photo_this_colors0_disconnect0_photos0param0\\": \\"123\\", \\"updateProducts_args_update_colors0_disconnect0_disconnect_photos_disconnect_color_where_Color_this_colors0_disconnect0_photos0_color0param0\\": \\"134\\", @@ -202,8 +202,8 @@ describe("https://github.com/neo4j/graphql/issues/2782", () => { \\"updateProducts\\": { \\"args\\": { \\"update\\": { - \\"id\\": \\"123\\", - \\"name\\": \\"Nested Connect\\", + \\"id_SET\\": \\"123\\", + \\"name_SET\\": \\"Nested Connect\\", \\"colors\\": [ { \\"disconnect\\": [ diff --git a/packages/graphql/tests/tck/issues/2789.test.ts b/packages/graphql/tests/tck/issues/2789.test.ts index c03573af8d..cb11e62a37 100644 --- a/packages/graphql/tests/tck/issues/2789.test.ts +++ b/packages/graphql/tests/tck/issues/2789.test.ts @@ -39,7 +39,7 @@ describe("https://github.com/neo4j/graphql/issues/2789", () => { test("has no conflicting parameters when combining node and field auth", async () => { const query = /* GraphQL */ ` mutation { - updateUsers(update: { password: "123" }) { + updateUsers(update: { password_SET: "123" }) { users { password } @@ -55,7 +55,7 @@ describe("https://github.com/neo4j/graphql/issues/2789", () => { WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($param1 IS NOT NULL AND this.id = $param1)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($authorization__before_param1 IS NOT NULL AND this.id = $authorization__before_param1)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) - SET this.password = $this_update_password + SET this.password = $this_update_password_SET WITH this WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($authorization__after_param1 IS NOT NULL AND this.id = $authorization__after_param1)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($authorization__after_param1 IS NOT NULL AND this.id = $authorization__after_param1)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH * @@ -69,7 +69,7 @@ describe("https://github.com/neo4j/graphql/issues/2789", () => { \\"update_param1\\": \\"Foo\\", \\"update_param2\\": \\"Bar\\", \\"param1\\": \\"Foo\\", - \\"this_update_password\\": \\"123\\", + \\"this_update_password_SET\\": \\"123\\", \\"authorization__before_param1\\": \\"Bar\\", \\"authorization__after_param1\\": \\"Foo\\", \\"resolvedCallbacks\\": {} diff --git a/packages/graphql/tests/tck/issues/2803.test.ts b/packages/graphql/tests/tck/issues/2803.test.ts index 732f9d11e1..404443fb47 100644 --- a/packages/graphql/tests/tck/issues/2803.test.ts +++ b/packages/graphql/tests/tck/issues/2803.test.ts @@ -1303,7 +1303,7 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { edge: { roles_INCLUDES: "another role" } } } - update: { name: "Exciting new name!" } + update: { name_SET: "Exciting new name!" } ) { actors { name @@ -1337,7 +1337,7 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { } WITH * WHERE var8 = true - SET this.name = $this_update_name + SET this.name = $this_update_name_SET RETURN collect(DISTINCT this { .name }) AS data" `); @@ -1349,7 +1349,7 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { }, \\"param1\\": \\"some role\\", \\"param2\\": \\"another role\\", - \\"this_update_name\\": \\"Exciting new name!\\", + \\"this_update_name_SET\\": \\"Exciting new name!\\", \\"resolvedCallbacks\\": {} }" `); diff --git a/packages/graphql/tests/tck/issues/288.test.ts b/packages/graphql/tests/tck/issues/288.test.ts index dcb6add946..5db4fb3178 100644 --- a/packages/graphql/tests/tck/issues/288.test.ts +++ b/packages/graphql/tests/tck/issues/288.test.ts @@ -84,7 +84,7 @@ describe("#288", () => { test("Can update a USER and COMPANYID is populated", async () => { const query = /* GraphQL */ ` mutation { - updateUsers(where: { USERID_EQ: "userid" }, update: { COMPANYID: "companyid2" }) { + updateUsers(where: { USERID_EQ: "userid" }, update: { COMPANYID_SET: "companyid2" }) { users { USERID COMPANYID @@ -98,14 +98,14 @@ describe("#288", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:USER) WHERE this.USERID = $param0 - SET this.COMPANYID = $this_update_COMPANYID + SET this.COMPANYID = $this_update_COMPANYID_SET RETURN collect(DISTINCT this { .USERID, .COMPANYID }) AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"param0\\": \\"userid\\", - \\"this_update_COMPANYID\\": \\"companyid2\\", + \\"this_update_COMPANYID_SET\\": \\"companyid2\\", \\"resolvedCallbacks\\": {} }" `); diff --git a/packages/graphql/tests/tck/issues/324.test.ts b/packages/graphql/tests/tck/issues/324.test.ts index b706bc08c7..b3fc54241a 100644 --- a/packages/graphql/tests/tck/issues/324.test.ts +++ b/packages/graphql/tests/tck/issues/324.test.ts @@ -74,7 +74,7 @@ describe("#324", () => { manufacturer: { update: { node: { - name: "Manufacturer", + name_SET: "Manufacturer", logo: { connect: { where: { node: { identifier_EQ: "Opel Logo" } } } }, }, }, @@ -97,7 +97,7 @@ describe("#324", () => { CALL { WITH this, this_car0 MATCH (this_car0)-[this_car0_manufacturer0_relationship:MANUFACTURER]->(this_car0_manufacturer0:Manufacturer) - SET this_car0_manufacturer0.name = $this_update_car0_manufacturer0_name + SET this_car0_manufacturer0.name = $this_update_car0_manufacturer0_name_SET WITH * CALL { WITH this, this_car0, this_car0_manufacturer0 @@ -150,7 +150,7 @@ describe("#324", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"param0\\": \\"Someone\\", - \\"this_update_car0_manufacturer0_name\\": \\"Manufacturer\\", + \\"this_update_car0_manufacturer0_name_SET\\": \\"Manufacturer\\", \\"this_car0_manufacturer0_logo0_connect0_node_param0\\": \\"Opel Logo\\", \\"resolvedCallbacks\\": {} }" diff --git a/packages/graphql/tests/tck/issues/3251.test.ts b/packages/graphql/tests/tck/issues/3251.test.ts index 8bb267dc67..85213294e4 100644 --- a/packages/graphql/tests/tck/issues/3251.test.ts +++ b/packages/graphql/tests/tck/issues/3251.test.ts @@ -47,7 +47,10 @@ describe("https://github.com/neo4j/graphql/issues/3251", () => { mutation UpdateMovieWithConnectAndUpdate { updateMovies( where: { name_EQ: "TestMovie1" } - update: { name: "TestMovie1", genre: { connect: { where: { node: { name_EQ: "Thriller" } } } } } + update: { + name_SET: "TestMovie1" + genre: { connect: { where: { node: { name_EQ: "Thriller" } } } } + } ) { movies { name @@ -64,7 +67,7 @@ describe("https://github.com/neo4j/graphql/issues/3251", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Movie) WHERE this.name = $param0 - SET this.name = $this_update_name + SET this.name = $this_update_name_SET WITH * CALL { WITH this @@ -104,7 +107,7 @@ describe("https://github.com/neo4j/graphql/issues/3251", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"param0\\": \\"TestMovie1\\", - \\"this_update_name\\": \\"TestMovie1\\", + \\"this_update_name_SET\\": \\"TestMovie1\\", \\"this_genre0_connect0_node_param0\\": \\"Thriller\\", \\"resolvedCallbacks\\": {} }" diff --git a/packages/graphql/tests/tck/issues/4583.test.ts b/packages/graphql/tests/tck/issues/4583.test.ts index 692f3cb52c..e4959af9c9 100644 --- a/packages/graphql/tests/tck/issues/4583.test.ts +++ b/packages/graphql/tests/tck/issues/4583.test.ts @@ -312,7 +312,7 @@ describe("https://github.com/neo4j/graphql/issues/4583", () => { UNWIND parentNodes as this0_actedIn_connect0_node UNWIND connectedNodes as this0_actedIn_connect0_node_actors0_node MERGE (this0_actedIn_connect0_node)<-[this0_actedIn_connect0_node_actors0_relationship:ACTED_IN]-(this0_actedIn_connect0_node_actors0_node) - SET this0_actedIn_connect0_node_actors0_relationship.screenTime = $this0_actedIn_connect0_node_actors0_relationship_screenTime + SET this0_actedIn_connect0_node_actors0_relationship.screenTime = $this0_actedIn_connect0_node_actors0_relationship_ActedIn_screenTime } } WITH this0, this0_actedIn_connect0_node, this0_actedIn_connect0_node_actors0_node @@ -348,7 +348,7 @@ describe("https://github.com/neo4j/graphql/issues/4583", () => { UNWIND parentNodes as this0_actedIn_connect1_node UNWIND connectedNodes as this0_actedIn_connect1_node_actors0_node MERGE (this0_actedIn_connect1_node)<-[this0_actedIn_connect1_node_actors0_relationship:ACTED_IN]-(this0_actedIn_connect1_node_actors0_node) - SET this0_actedIn_connect1_node_actors0_relationship.episodeNr = $this0_actedIn_connect1_node_actors0_relationship_episodeNr + SET this0_actedIn_connect1_node_actors0_relationship.episodeNr = $this0_actedIn_connect1_node_actors0_relationship_StarredIn_episodeNr } } WITH this0, this0_actedIn_connect1_node, this0_actedIn_connect1_node_actors0_node @@ -374,7 +374,7 @@ describe("https://github.com/neo4j/graphql/issues/4583", () => { \\"high\\": 0 }, \\"this0_actedIn_connect0_node_actors0_node_param0\\": \\"Second Actor\\", - \\"this0_actedIn_connect0_node_actors0_relationship_screenTime\\": { + \\"this0_actedIn_connect0_node_actors0_relationship_ActedIn_screenTime\\": { \\"low\\": 25, \\"high\\": 0 }, @@ -384,7 +384,7 @@ describe("https://github.com/neo4j/graphql/issues/4583", () => { \\"high\\": 0 }, \\"this0_actedIn_connect1_node_actors0_node_param0\\": \\"Second Actor\\", - \\"this0_actedIn_connect1_node_actors0_relationship_episodeNr\\": { + \\"this0_actedIn_connect1_node_actors0_relationship_StarredIn_episodeNr\\": { \\"low\\": 10, \\"high\\": 0 }, diff --git a/packages/graphql/tests/tck/operations/disconnect.test.ts b/packages/graphql/tests/tck/operations/disconnect.test.ts index eaeba2468f..3ee1eb25bb 100644 --- a/packages/graphql/tests/tck/operations/disconnect.test.ts +++ b/packages/graphql/tests/tck/operations/disconnect.test.ts @@ -63,8 +63,8 @@ describe("Cypher Disconnect", () => { mutation { updateProducts( update: { - id: "123" - name: "Nested Connect" + id_SET: "123" + name_SET: "Nested Connect" colors: { disconnect: [ { @@ -105,8 +105,8 @@ describe("Cypher Disconnect", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Product) - SET this.id = $this_update_id - SET this.name = $this_update_name + SET this.id = $this_update_id_SET + SET this.name = $this_update_name_SET WITH this CALL { WITH this @@ -199,8 +199,8 @@ describe("Cypher Disconnect", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ - \\"this_update_id\\": \\"123\\", - \\"this_update_name\\": \\"Nested Connect\\", + \\"this_update_id_SET\\": \\"123\\", + \\"this_update_name_SET\\": \\"Nested Connect\\", \\"updateProducts_args_update_colors0_disconnect0_where_Color_this_colors0_disconnect0param0\\": \\"Red\\", \\"updateProducts_args_update_colors0_disconnect0_disconnect_photos0_where_Photo_this_colors0_disconnect0_photos0param0\\": \\"123\\", \\"updateProducts_args_update_colors0_disconnect0_disconnect_photos_disconnect_color_where_Color_this_colors0_disconnect0_photos0_color0param0\\": \\"134\\", @@ -211,8 +211,8 @@ describe("Cypher Disconnect", () => { \\"updateProducts\\": { \\"args\\": { \\"update\\": { - \\"id\\": \\"123\\", - \\"name\\": \\"Nested Connect\\", + \\"id_SET\\": \\"123\\", + \\"name_SET\\": \\"Nested Connect\\", \\"colors\\": [ { \\"disconnect\\": [ diff --git a/packages/graphql/tests/tck/operations/update.test.ts b/packages/graphql/tests/tck/operations/update.test.ts index fd04432d7c..ac9a1a2ab2 100644 --- a/packages/graphql/tests/tck/operations/update.test.ts +++ b/packages/graphql/tests/tck/operations/update.test.ts @@ -50,7 +50,7 @@ describe("Cypher Update", () => { test("Simple Update", async () => { const query = /* GraphQL */ ` mutation { - updateMovies(where: { id_EQ: "1" }, update: { id: "2" }) { + updateMovies(where: { id_EQ: "1" }, update: { id_SET: "2" }) { movies { id } @@ -63,14 +63,14 @@ describe("Cypher Update", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Movie) WHERE this.id = $param0 - SET this.id = $this_update_id + SET this.id = $this_update_id_SET RETURN collect(DISTINCT this { .id }) AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"param0\\": \\"1\\", - \\"this_update_id\\": \\"2\\", + \\"this_update_id_SET\\": \\"2\\", \\"resolvedCallbacks\\": {} }" `); @@ -82,7 +82,9 @@ describe("Cypher Update", () => { updateMovies( where: { id_EQ: "1" } update: { - actors: [{ where: { node: { name_EQ: "old name" } }, update: { node: { name: "new name" } } }] + actors: [ + { where: { node: { name_EQ: "old name" } }, update: { node: { name_SET: "new name" } } } + ] } ) { movies { @@ -102,7 +104,7 @@ describe("Cypher Update", () => { WITH this MATCH (this)<-[this_acted_in0_relationship:ACTED_IN]-(this_actors0:Actor) WHERE this_actors0.name = $updateMovies_args_update_actors0_where_this_actors0param0 - SET this_actors0.name = $this_update_actors0_name + SET this_actors0.name = $this_update_actors0_name_SET RETURN count(*) AS update_this_actors0 } RETURN collect(DISTINCT this { .id }) AS data" @@ -112,7 +114,7 @@ describe("Cypher Update", () => { "{ \\"param0\\": \\"1\\", \\"updateMovies_args_update_actors0_where_this_actors0param0\\": \\"old name\\", - \\"this_update_actors0_name\\": \\"new name\\", + \\"this_update_actors0_name_SET\\": \\"new name\\", \\"updateMovies\\": { \\"args\\": { \\"update\\": { @@ -125,7 +127,7 @@ describe("Cypher Update", () => { }, \\"update\\": { \\"node\\": { - \\"name\\": \\"new name\\" + \\"name_SET\\": \\"new name\\" } } } @@ -149,11 +151,11 @@ describe("Cypher Update", () => { where: { node: { name_EQ: "old actor name" } } update: { node: { - name: "new actor name" + name_SET: "new actor name" movies: [ { where: { node: { id_EQ: "old movie title" } } - update: { node: { title: "new movie title" } } + update: { node: { title_SET: "new movie title" } } } ] } @@ -179,13 +181,13 @@ describe("Cypher Update", () => { WITH this MATCH (this)<-[this_acted_in0_relationship:ACTED_IN]-(this_actors0:Actor) WHERE this_actors0.name = $updateMovies_args_update_actors0_where_this_actors0param0 - SET this_actors0.name = $this_update_actors0_name + SET this_actors0.name = $this_update_actors0_name_SET WITH this, this_actors0 CALL { WITH this, this_actors0 MATCH (this_actors0)-[this_actors0_acted_in0_relationship:ACTED_IN]->(this_actors0_movies0:Movie) WHERE this_actors0_movies0.id = $updateMovies_args_update_actors0_update_node_movies0_where_this_actors0_movies0param0 - SET this_actors0_movies0.title = $this_update_actors0_movies0_title + SET this_actors0_movies0.title = $this_update_actors0_movies0_title_SET RETURN count(*) AS update_this_actors0_movies0 } RETURN count(*) AS update_this_actors0 @@ -197,9 +199,9 @@ describe("Cypher Update", () => { "{ \\"param0\\": \\"1\\", \\"updateMovies_args_update_actors0_where_this_actors0param0\\": \\"old actor name\\", - \\"this_update_actors0_name\\": \\"new actor name\\", + \\"this_update_actors0_name_SET\\": \\"new actor name\\", \\"updateMovies_args_update_actors0_update_node_movies0_where_this_actors0_movies0param0\\": \\"old movie title\\", - \\"this_update_actors0_movies0_title\\": \\"new movie title\\", + \\"this_update_actors0_movies0_title_SET\\": \\"new movie title\\", \\"updateMovies\\": { \\"args\\": { \\"update\\": { @@ -212,7 +214,7 @@ describe("Cypher Update", () => { }, \\"update\\": { \\"node\\": { - \\"name\\": \\"new actor name\\", + \\"name_SET\\": \\"new actor name\\", \\"movies\\": [ { \\"where\\": { @@ -222,7 +224,7 @@ describe("Cypher Update", () => { }, \\"update\\": { \\"node\\": { - \\"title\\": \\"new movie title\\" + \\"title_SET\\": \\"new movie title\\" } } } @@ -758,7 +760,7 @@ describe("Cypher Update", () => { update: { actors: { where: { node: { name_EQ: "Actor to update" } } - update: { node: { name: "Updated name" } } + update: { node: { name_SET: "Updated name" } } delete: { where: { node: { name_EQ: "Actor to delete" } } } } } @@ -792,7 +794,7 @@ describe("Cypher Update", () => { WITH this MATCH (this)<-[this_acted_in0_relationship:ACTED_IN]-(this_actors0:Actor) WHERE this_actors0.name = $updateMovies_args_update_actors0_where_this_actors0param0 - SET this_actors0.name = $this_update_actors0_name + SET this_actors0.name = $this_update_actors0_name_SET RETURN count(*) AS update_this_actors0 } RETURN collect(DISTINCT this { .id }) AS data" @@ -803,7 +805,7 @@ describe("Cypher Update", () => { \\"param0\\": \\"1\\", \\"updateMovies_args_update_actors0_delete0_where_this_actors0_delete0param0\\": \\"Actor to delete\\", \\"updateMovies_args_update_actors0_where_this_actors0param0\\": \\"Actor to update\\", - \\"this_update_actors0_name\\": \\"Updated name\\", + \\"this_update_actors0_name_SET\\": \\"Updated name\\", \\"updateMovies\\": { \\"args\\": { \\"update\\": { @@ -816,7 +818,7 @@ describe("Cypher Update", () => { }, \\"update\\": { \\"node\\": { - \\"name\\": \\"Updated name\\" + \\"name_SET\\": \\"Updated name\\" } }, \\"delete\\": [ diff --git a/packages/graphql/tests/tck/pringles.test.ts b/packages/graphql/tests/tck/pringles.test.ts index 269897a6b6..a818470de2 100644 --- a/packages/graphql/tests/tck/pringles.test.ts +++ b/packages/graphql/tests/tck/pringles.test.ts @@ -256,7 +256,7 @@ describe("Cypher Create Pringles", () => { where: { node: { description_EQ: "Green Photo" } } update: { node: { - description: "Light Green Photo" + description_SET: "Light Green Photo" color: { connect: { where: { node: { name_EQ: "Light Green" } } } disconnect: { where: { node: { name_EQ: "Green" } } } @@ -284,7 +284,7 @@ describe("Cypher Create Pringles", () => { WITH this MATCH (this)-[this_has_photo0_relationship:HAS_PHOTO]->(this_photos0:Photo) WHERE this_photos0.description = $updateProducts_args_update_photos0_where_this_photos0param0 - SET this_photos0.description = $this_update_photos0_description + SET this_photos0.description = $this_update_photos0_description_SET WITH this, this_photos0 CALL { WITH this, this_photos0 @@ -333,7 +333,7 @@ describe("Cypher Create Pringles", () => { "{ \\"param0\\": \\"Pringles\\", \\"updateProducts_args_update_photos0_where_this_photos0param0\\": \\"Green Photo\\", - \\"this_update_photos0_description\\": \\"Light Green Photo\\", + \\"this_update_photos0_description_SET\\": \\"Light Green Photo\\", \\"updateProducts_args_update_photos0_update_node_color_disconnect_where_Color_this_photos0_color0_disconnect0param0\\": \\"Green\\", \\"this_photos0_color0_connect0_node_param0\\": \\"Light Green\\", \\"updateProducts\\": { @@ -348,7 +348,7 @@ describe("Cypher Create Pringles", () => { }, \\"update\\": { \\"node\\": { - \\"description\\": \\"Light Green Photo\\", + \\"description_SET\\": \\"Light Green Photo\\", \\"color\\": { \\"connect\\": { \\"where\\": { diff --git a/packages/graphql/tests/tck/rfcs/rfc-003.test.ts b/packages/graphql/tests/tck/rfcs/rfc-003.test.ts index 3fd2d73147..f614fb231c 100644 --- a/packages/graphql/tests/tck/rfcs/rfc-003.test.ts +++ b/packages/graphql/tests/tck/rfcs/rfc-003.test.ts @@ -342,7 +342,7 @@ describe("tck/rfs/003", () => { const mutation = /* GraphQL */ ` mutation { - updateMovies(where: { id_EQ: "${movieId}" }, update: { id: "${movieId}" }) { + updateMovies(where: { id_EQ: "${movieId}" }, update: { id_SET: "${movieId}" }) { info { nodesCreated } @@ -355,7 +355,7 @@ describe("tck/rfs/003", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Movie) WHERE this.id = $param0 - SET this.id = $this_update_id + SET this.id = $this_update_id_SET WITH * CALL { WITH this @@ -370,7 +370,7 @@ describe("tck/rfs/003", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"param0\\": \\"movieId-3\\", - \\"this_update_id\\": \\"movieId-3\\", + \\"this_update_id_SET\\": \\"movieId-3\\", \\"resolvedCallbacks\\": {} }" `); @@ -394,7 +394,7 @@ describe("tck/rfs/003", () => { const mutation = /* GraphQL */ ` mutation { - updateMovies(where: { id_EQ: "${movieId}" }, update: { id: "${movieId}" }) { + updateMovies(where: { id_EQ: "${movieId}" }, update: { id_SET: "${movieId}" }) { info { nodesCreated } @@ -407,7 +407,7 @@ describe("tck/rfs/003", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Movie) WHERE this.id = $param0 - SET this.id = $this_update_id + SET this.id = $this_update_id_SET WITH * CALL { WITH this @@ -422,7 +422,7 @@ describe("tck/rfs/003", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"param0\\": \\"movieId-3\\", - \\"this_update_id\\": \\"movieId-3\\", + \\"this_update_id_SET\\": \\"movieId-3\\", \\"resolvedCallbacks\\": {} }" `); @@ -455,7 +455,7 @@ describe("tck/rfs/003", () => { mutation { updateMovies( where: { id_EQ: "${movieId}" } - update: { director: { update: { node: { id: "${directorId}" } } } } + update: { director: { update: { node: { id_SET: "${directorId}" } } } } ) { info { nodesCreated @@ -473,7 +473,7 @@ describe("tck/rfs/003", () => { CALL { WITH this MATCH (this)<-[this_directed0_relationship:DIRECTED]-(this_director0:Director) - SET this_director0.id = $this_update_director0_id + SET this_director0.id = $this_update_director0_id_SET WITH this, this_director0 CALL { WITH this_director0 @@ -498,7 +498,7 @@ describe("tck/rfs/003", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"param0\\": \\"movieId-4\\", - \\"this_update_director0_id\\": \\"directorId-3\\", + \\"this_update_director0_id_SET\\": \\"directorId-3\\", \\"resolvedCallbacks\\": {} }" `); @@ -530,7 +530,7 @@ describe("tck/rfs/003", () => { mutation { updateMovies( where: { id_EQ: "${movieId}" } - update: { director: { update: { node: { id: "${directorId}" } } } } + update: { director: { update: { node: { id_SET: "${directorId}" } } } } ) { info { nodesCreated @@ -548,7 +548,7 @@ describe("tck/rfs/003", () => { CALL { WITH this MATCH (this)<-[this_directed0_relationship:DIRECTED]-(this_director0:Director) - SET this_director0.id = $this_update_director0_id + SET this_director0.id = $this_update_director0_id_SET WITH this, this_director0 CALL { WITH this_director0 @@ -573,7 +573,7 @@ describe("tck/rfs/003", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"param0\\": \\"movieId-4\\", - \\"this_update_director0_id\\": \\"directorId-3\\", + \\"this_update_director0_id_SET\\": \\"directorId-3\\", \\"resolvedCallbacks\\": {} }" `); diff --git a/packages/graphql/tests/tck/subscriptions/update.test.ts b/packages/graphql/tests/tck/subscriptions/update.test.ts index b1039bd02c..16e377daa9 100644 --- a/packages/graphql/tests/tck/subscriptions/update.test.ts +++ b/packages/graphql/tests/tck/subscriptions/update.test.ts @@ -49,7 +49,7 @@ describe("Subscriptions metadata on update", () => { test("Simple update with subscriptions", async () => { const query = /* GraphQL */ ` mutation { - updateMovies(where: { id_EQ: "1" }, update: { id: "2" }) { + updateMovies(where: { id_EQ: "1" }, update: { id_SET: "2" }) { movies { id } @@ -62,14 +62,14 @@ describe("Subscriptions metadata on update", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Movie) WHERE this.id = $param0 - SET this.id = $this_update_id + SET this.id = $this_update_id_SET RETURN collect(DISTINCT this { .id }) AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"param0\\": \\"1\\", - \\"this_update_id\\": \\"2\\", + \\"this_update_id_SET\\": \\"2\\", \\"resolvedCallbacks\\": {} }" `); @@ -81,8 +81,8 @@ describe("Subscriptions metadata on update", () => { updateMovies( where: { id_EQ: "1" } update: { - id: "2" - actors: [{ where: { node: { name_EQ: "arthur" } }, update: { node: { name: "ford" } } }] + id_SET: "2" + actors: [{ where: { node: { name_EQ: "arthur" } }, update: { node: { name_SET: "ford" } } }] } ) { movies { @@ -97,13 +97,13 @@ describe("Subscriptions metadata on update", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Movie) WHERE this.id = $param0 - SET this.id = $this_update_id + SET this.id = $this_update_id_SET WITH this CALL { WITH this MATCH (this)<-[this_acted_in0_relationship:ACTED_IN]-(this_actors0:Actor) WHERE this_actors0.name = $updateMovies_args_update_actors0_where_this_actors0param0 - SET this_actors0.name = $this_update_actors0_name + SET this_actors0.name = $this_update_actors0_name_SET RETURN count(*) AS update_this_actors0 } RETURN collect(DISTINCT this { .id }) AS data" @@ -112,13 +112,13 @@ describe("Subscriptions metadata on update", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"param0\\": \\"1\\", - \\"this_update_id\\": \\"2\\", + \\"this_update_id_SET\\": \\"2\\", \\"updateMovies_args_update_actors0_where_this_actors0param0\\": \\"arthur\\", - \\"this_update_actors0_name\\": \\"ford\\", + \\"this_update_actors0_name_SET\\": \\"ford\\", \\"updateMovies\\": { \\"args\\": { \\"update\\": { - \\"id\\": \\"2\\", + \\"id_SET\\": \\"2\\", \\"actors\\": [ { \\"where\\": { @@ -128,7 +128,7 @@ describe("Subscriptions metadata on update", () => { }, \\"update\\": { \\"node\\": { - \\"name\\": \\"ford\\" + \\"name_SET\\": \\"ford\\" } } } diff --git a/packages/graphql/tests/tck/types/date.test.ts b/packages/graphql/tests/tck/types/date.test.ts index 03a8d8c03d..ceba74c061 100644 --- a/packages/graphql/tests/tck/types/date.test.ts +++ b/packages/graphql/tests/tck/types/date.test.ts @@ -136,7 +136,7 @@ describe("Cypher Date", () => { test("Simple Update", async () => { const query = /* GraphQL */ ` mutation { - updateMovies(update: { date: "1970-01-01" }) { + updateMovies(update: { date_SET: "1970-01-01" }) { movies { id date @@ -149,13 +149,13 @@ describe("Cypher Date", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Movie) - SET this.date = $this_update_date + SET this.date = $this_update_date_SET RETURN collect(DISTINCT this { .id, .date }) AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ - \\"this_update_date\\": { + \\"this_update_date_SET\\": { \\"year\\": 1970, \\"month\\": 1, \\"day\\": 1 diff --git a/packages/graphql/tests/tck/types/datetime.test.ts b/packages/graphql/tests/tck/types/datetime.test.ts index f40bd89d88..8a31284608 100644 --- a/packages/graphql/tests/tck/types/datetime.test.ts +++ b/packages/graphql/tests/tck/types/datetime.test.ts @@ -118,7 +118,7 @@ describe("Cypher DateTime", () => { test("Simple Update", async () => { const query = /* GraphQL */ ` mutation { - updateMovies(update: { datetime: "1970-01-01T00:00:00.000Z" }) { + updateMovies(update: { datetime_SET: "1970-01-01T00:00:00.000Z" }) { movies { id datetime @@ -131,13 +131,13 @@ describe("Cypher DateTime", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Movie) - SET this.datetime = $this_update_datetime + SET this.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" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ - \\"this_update_datetime\\": { + \\"this_update_datetime_SET\\": { \\"year\\": 1970, \\"month\\": 1, \\"day\\": 1, diff --git a/packages/graphql/tests/tck/types/duration.test.ts b/packages/graphql/tests/tck/types/duration.test.ts index b39224c936..f45c4baa35 100644 --- a/packages/graphql/tests/tck/types/duration.test.ts +++ b/packages/graphql/tests/tck/types/duration.test.ts @@ -157,7 +157,7 @@ describe("Cypher Duration", () => { test("Simple Update", async () => { const query = /* GraphQL */ ` mutation { - updateMovies(update: { duration: "P4D" }) { + updateMovies(update: { duration_SET: "P4D" }) { movies { id duration @@ -170,13 +170,13 @@ describe("Cypher Duration", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Movie) - SET this.duration = $this_update_duration + SET this.duration = $this_update_duration_SET RETURN collect(DISTINCT this { .id, .duration }) AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ - \\"this_update_duration\\": { + \\"this_update_duration_SET\\": { \\"months\\": 0, \\"days\\": 4, \\"seconds\\": { diff --git a/packages/graphql/tests/tck/types/localdatetime.test.ts b/packages/graphql/tests/tck/types/localdatetime.test.ts index 85750e89a9..298e9beb90 100644 --- a/packages/graphql/tests/tck/types/localdatetime.test.ts +++ b/packages/graphql/tests/tck/types/localdatetime.test.ts @@ -148,7 +148,7 @@ describe("Cypher LocalDateTime", () => { test("Simple Update", async () => { const query = /* GraphQL */ ` mutation { - updateMovies(update: { localDT: "1881-07-13T09:24:40.845512" }) { + updateMovies(update: { localDT_SET: "1881-07-13T09:24:40.845512" }) { movies { id localDT @@ -161,13 +161,13 @@ describe("Cypher LocalDateTime", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Movie) - SET this.localDT = $this_update_localDT + SET this.localDT = $this_update_localDT_SET RETURN collect(DISTINCT this { .id, .localDT }) AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ - \\"this_update_localDT\\": { + \\"this_update_localDT_SET\\": { \\"year\\": 1881, \\"month\\": 7, \\"day\\": 13, diff --git a/packages/graphql/tests/tck/types/localtime.test.ts b/packages/graphql/tests/tck/types/localtime.test.ts index 7fdf4fb6e2..8290fe047b 100644 --- a/packages/graphql/tests/tck/types/localtime.test.ts +++ b/packages/graphql/tests/tck/types/localtime.test.ts @@ -139,7 +139,7 @@ describe("Cypher LocalTime", () => { test("Simple Update", async () => { const query = /* GraphQL */ ` mutation { - updateMovies(update: { time: "09:24:40.845512" }) { + updateMovies(update: { time_SET: "09:24:40.845512" }) { movies { id time @@ -152,13 +152,13 @@ describe("Cypher LocalTime", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Movie) - SET this.time = $this_update_time + SET this.time = $this_update_time_SET RETURN collect(DISTINCT this { .id, .time }) AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ - \\"this_update_time\\": { + \\"this_update_time_SET\\": { \\"hour\\": 9, \\"minute\\": 24, \\"second\\": 40, diff --git a/packages/graphql/tests/tck/types/point.test.ts b/packages/graphql/tests/tck/types/point.test.ts index ea663ea3c6..3aec6e70d1 100644 --- a/packages/graphql/tests/tck/types/point.test.ts +++ b/packages/graphql/tests/tck/types/point.test.ts @@ -346,7 +346,10 @@ describe("Cypher Points", () => { test("Simple Point update mutation", async () => { const query = /* GraphQL */ ` mutation { - updatePointContainers(where: { id_EQ: "id" }, update: { point: { longitude: 1.0, latitude: 2.0 } }) { + updatePointContainers( + where: { id_EQ: "id" } + update: { point_SET: { longitude: 1.0, latitude: 2.0 } } + ) { pointContainers { point { longitude @@ -363,14 +366,14 @@ describe("Cypher Points", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:PointContainer) WHERE this.id = $param0 - SET this.point = point($this_update_point) + SET this.point = point($this_update_point_SET) RETURN collect(DISTINCT this { .point }) AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"param0\\": \\"id\\", - \\"this_update_point\\": { + \\"this_update_point_SET\\": { \\"longitude\\": 1, \\"latitude\\": 2 }, diff --git a/packages/graphql/tests/tck/types/points.test.ts b/packages/graphql/tests/tck/types/points.test.ts index 1b45edbd52..26ed953e60 100644 --- a/packages/graphql/tests/tck/types/points.test.ts +++ b/packages/graphql/tests/tck/types/points.test.ts @@ -133,7 +133,6 @@ describe("Cypher Points", () => { `); }); - test("Simple Points create mutation", async () => { const query = /* GraphQL */ ` mutation { @@ -182,7 +181,10 @@ describe("Cypher Points", () => { test("Simple Points update mutation", async () => { const query = /* GraphQL */ ` mutation { - updatePointContainers(where: { id_EQ: "id" }, update: { points: [{ longitude: 1.0, latitude: 2.0 }] }) { + updatePointContainers( + where: { id_EQ: "id" } + update: { points_SET: [{ longitude: 1.0, latitude: 2.0 }] } + ) { pointContainers { points { longitude @@ -199,14 +201,14 @@ describe("Cypher Points", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:PointContainer) WHERE this.id = $param0 - SET this.points = [p in $this_update_points | point(p)] + SET this.points = [p in $this_update_points_SET | point(p)] RETURN collect(DISTINCT this { .points }) AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"param0\\": \\"id\\", - \\"this_update_points\\": [ + \\"this_update_points_SET\\": [ { \\"longitude\\": 1, \\"latitude\\": 2 diff --git a/packages/graphql/tests/tck/types/time.test.ts b/packages/graphql/tests/tck/types/time.test.ts index bfcff41902..1a9608a017 100644 --- a/packages/graphql/tests/tck/types/time.test.ts +++ b/packages/graphql/tests/tck/types/time.test.ts @@ -142,7 +142,7 @@ describe("Cypher Time", () => { test("Simple Update", async () => { const query = /* GraphQL */ ` mutation { - updateMovies(update: { time: "09:24:40.845512+06:30" }) { + updateMovies(update: { time_SET: "09:24:40.845512+06:30" }) { movies { id time @@ -155,13 +155,13 @@ describe("Cypher Time", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Movie) - SET this.time = $this_update_time + SET this.time = $this_update_time_SET RETURN collect(DISTINCT this { .id, .time }) AS data" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ - \\"this_update_time\\": { + \\"this_update_time_SET\\": { \\"hour\\": 9, \\"minute\\": 24, \\"second\\": 40, diff --git a/packages/graphql/tests/tck/union.test.ts b/packages/graphql/tests/tck/union.test.ts index 83797e3e30..26957f6318 100644 --- a/packages/graphql/tests/tck/union.test.ts +++ b/packages/graphql/tests/tck/union.test.ts @@ -371,7 +371,7 @@ describe("Cypher Union", () => { search: { Genre: { where: { node: { name_EQ: "some genre" } } - update: { node: { name: "some new genre" } } + update: { node: { name_SET: "some new genre" } } } } } @@ -394,7 +394,7 @@ describe("Cypher Union", () => { WITH this MATCH (this)-[this_search0_relationship:SEARCH]->(this_search_Genre0:Genre) WHERE this_search_Genre0.name = $updateMovies_args_update_search_Genre0_where_this_search_Genre0param0 - SET this_search_Genre0.name = $this_update_search_Genre0_name + SET this_search_Genre0.name = $this_update_search_Genre0_name_SET RETURN count(*) AS update_this_search_Genre0 } RETURN collect(DISTINCT this { .title }) AS data" @@ -404,7 +404,7 @@ describe("Cypher Union", () => { "{ \\"param0\\": \\"some movie\\", \\"updateMovies_args_update_search_Genre0_where_this_search_Genre0param0\\": \\"some genre\\", - \\"this_update_search_Genre0_name\\": \\"some new genre\\", + \\"this_update_search_Genre0_name_SET\\": \\"some new genre\\", \\"updateMovies\\": { \\"args\\": { \\"update\\": { @@ -418,7 +418,7 @@ describe("Cypher Union", () => { }, \\"update\\": { \\"node\\": { - \\"name\\": \\"some new genre\\" + \\"name_SET\\": \\"some new genre\\" } } } diff --git a/packages/introspector/package.json b/packages/introspector/package.json index 160f80828d..5dd097159d 100644 --- a/packages/introspector/package.json +++ b/packages/introspector/package.json @@ -36,7 +36,7 @@ "devDependencies": { "@neo4j/graphql": "^6.0.0", "@types/jest": "29.5.14", - "@types/node": "20.17.5", + "@types/node": "22.9.0", "@types/pluralize": "0.0.33", "jest": "29.7.0", "ts-jest": "29.2.5", diff --git a/yarn.lock b/yarn.lock index c9d31d231e..e00a4bfd1e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -401,20 +401,20 @@ __metadata: linkType: hard "@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.16.7, @babel/code-frame@npm:^7.25.9, @babel/code-frame@npm:^7.26.0": - version: 7.26.0 - resolution: "@babel/code-frame@npm:7.26.0" + version: 7.26.2 + resolution: "@babel/code-frame@npm:7.26.2" dependencies: "@babel/helper-validator-identifier": "npm:^7.25.9" js-tokens: "npm:^4.0.0" picocolors: "npm:^1.0.0" - checksum: 10c0/46f7e367714be736b52ea3c01b24f47e2102e210fb83021d1c8237d8fc511b9538909e16e2fcdbb5cb6173e0794e28624309a59014e52fcfb7bde908f5284388 + checksum: 10c0/7d79621a6849183c415486af99b1a20b84737e8c11cd55b6544f688c51ce1fd710e6d869c3dd21232023da272a79b91efb3e83b5bc2dc65c1187c5fcd1b72ea8 languageName: node linkType: hard "@babel/compat-data@npm:^7.25.9": - version: 7.26.0 - resolution: "@babel/compat-data@npm:7.26.0" - checksum: 10c0/6325c9151a3c9b0a3a807e854a26255ef66d989bff331475a935af9bb18f160e0fffe6aed550e4e96b63f91efcd874bfbaab2a1f4a2f8d25645d712a0de590fb + version: 7.26.2 + resolution: "@babel/compat-data@npm:7.26.2" + checksum: 10c0/c9b5f3724828d17f728a778f9d66c19b55c018d0d76de6d731178cca64f182c22b71400a73bf2b65dcc4fcfe52b630088a94d5902911b54206aa90e3ffe07d12 languageName: node linkType: hard @@ -442,15 +442,15 @@ __metadata: linkType: hard "@babel/generator@npm:^7.25.9, @babel/generator@npm:^7.26.0, @babel/generator@npm:^7.7.2": - version: 7.26.0 - resolution: "@babel/generator@npm:7.26.0" + version: 7.26.2 + resolution: "@babel/generator@npm:7.26.2" dependencies: - "@babel/parser": "npm:^7.26.0" + "@babel/parser": "npm:^7.26.2" "@babel/types": "npm:^7.26.0" "@jridgewell/gen-mapping": "npm:^0.3.5" "@jridgewell/trace-mapping": "npm:^0.3.25" jsesc: "npm:^3.0.2" - checksum: 10c0/b6bb9185f19a97eaf58e04a6d39a13237076678e7ed16b6321dea914535d4bf6a8d7727c9dcb65539845aa0096b326eb67be4bab764bd74bcfd848e2eda68609 + checksum: 10c0/167ebce8977142f5012fad6bd91da51ac52bcd752f2261a54b7ab605d928aebe57e21636cdd2a9c7757e552652c68d9fcb5d40b06fcb66e02d9ee7526e118a5c languageName: node linkType: hard @@ -528,14 +528,14 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.25.9, @babel/parser@npm:^7.26.0": - version: 7.26.1 - resolution: "@babel/parser@npm:7.26.1" +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.25.9, @babel/parser@npm:^7.26.0, @babel/parser@npm:^7.26.2": + version: 7.26.2 + resolution: "@babel/parser@npm:7.26.2" dependencies: "@babel/types": "npm:^7.26.0" bin: parser: ./bin/babel-parser.js - checksum: 10c0/dc7d4e6b7eb667fa0784e7e2c3f6f92ca12ad72242f6d4311995310dae55093f02acdb595b69b0dbbf04cb61ad87156ac03186ff32eacfa35149c655bc22c14b + checksum: 10c0/751a743087b3a9172a7599f1421830d44c38f065ef781588d2bfb1c98f9b461719a226feb13c868d7a284783eee120c88ea522593118f2668f46ebfb1105c4d7 languageName: node linkType: hard @@ -2088,12 +2088,12 @@ __metadata: "@types/is-uuid": "npm:1.0.2" "@types/jest": "npm:29.5.14" "@types/jsonwebtoken": "npm:9.0.7" - "@types/node": "npm:20.17.5" + "@types/node": "npm:22.9.0" "@types/pluralize": "npm:0.0.33" "@types/randomstring": "npm:1.3.0" "@types/semver": "npm:7.5.8" "@types/supertest": "npm:6.0.2" - "@types/ws": "npm:8.5.12" + "@types/ws": "npm:8.5.13" camelcase: "npm:^6.3.0" debug: "npm:^4.3.4" dot-prop: "npm:^6.0.1" @@ -2112,7 +2112,7 @@ __metadata: koa-jwt: "npm:4.0.4" koa-router: "npm:13.0.1" mock-jwks: "npm:1.0.10" - nock: "npm:13.5.5" + nock: "npm:13.5.6" pluralize: "npm:^8.0.0" randomstring: "npm:1.3.0" rimraf: "npm:5.0.10" @@ -2135,7 +2135,7 @@ __metadata: dependencies: "@neo4j/graphql": "npm:^6.0.0" "@types/jest": "npm:29.5.14" - "@types/node": "npm:20.17.5" + "@types/node": "npm:22.9.0" "@types/pluralize": "npm:0.0.33" camelcase: "npm:^6.3.0" debug: "npm:^4.3.4" @@ -2219,7 +2219,7 @@ __metadata: languageName: node linkType: hard -"@peculiar/asn1-schema@npm:^2.3.13": +"@peculiar/asn1-schema@npm:^2.3.13, @peculiar/asn1-schema@npm:^2.3.8": version: 2.3.13 resolution: "@peculiar/asn1-schema@npm:2.3.13" dependencies: @@ -2230,17 +2230,6 @@ __metadata: languageName: node linkType: hard -"@peculiar/asn1-schema@npm:^2.3.8": - version: 2.3.8 - resolution: "@peculiar/asn1-schema@npm:2.3.8" - dependencies: - asn1js: "npm:^3.0.5" - pvtsutils: "npm:^1.3.5" - tslib: "npm:^2.6.2" - checksum: 10c0/65f16b2a7eb91365b6dac47730ffcad4617ef04b821e0a4286c379ac7283588b0a6744032ee686e0914a0886c2a055108ed945b9c4d22821a3b123640b61f3b2 - languageName: node - linkType: hard - "@peculiar/json-schema@npm:^1.1.12": version: 1.1.12 resolution: "@peculiar/json-schema@npm:1.1.12" @@ -2787,7 +2776,7 @@ __metadata: languageName: node linkType: hard -"@types/jsonwebtoken@npm:9.0.7": +"@types/jsonwebtoken@npm:9.0.7, @types/jsonwebtoken@npm:^9.0.2": version: 9.0.7 resolution: "@types/jsonwebtoken@npm:9.0.7" dependencies: @@ -2796,15 +2785,6 @@ __metadata: languageName: node linkType: hard -"@types/jsonwebtoken@npm:^9.0.2": - version: 9.0.6 - resolution: "@types/jsonwebtoken@npm:9.0.6" - dependencies: - "@types/node": "npm:*" - checksum: 10c0/9c29e3896e5fb6056e54d87514643e59e0cfb966ae25171a107776270195bba955f0373e98c8ed6450c145b18984f5df9cf0fcac360f382cec3c7c4d3510b202 - languageName: node - linkType: hard - "@types/keyv@npm:^3.1.1, @types/keyv@npm:^3.1.4": version: 3.1.4 resolution: "@types/keyv@npm:3.1.4" @@ -2852,21 +2832,12 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:*": - version: 22.8.1 - resolution: "@types/node@npm:22.8.1" +"@types/node@npm:*, @types/node@npm:22.9.0": + version: 22.9.0 + resolution: "@types/node@npm:22.9.0" dependencies: undici-types: "npm:~6.19.8" - checksum: 10c0/83550fdf72a7db5b55eceac3f4fb038844eaee20202bdd2297a8248370cfa08317bda1605b781a8043eda4f173b75e73632e652fc85509eb14dfef78fa17337f - languageName: node - linkType: hard - -"@types/node@npm:20.17.5": - version: 20.17.5 - resolution: "@types/node@npm:20.17.5" - dependencies: - undici-types: "npm:~6.19.2" - checksum: 10c0/6e6bf7f84365a2ee95a369c48cdb47a93aae2b5029d19660183ba944d7bdbc193e54167076d64a3a11ff28e307b84c90eda350edf8e2029195d1fc27ae6055f4 + checksum: 10c0/3f46cbe0a49bab4ba30494025e4c8a6e699b98ac922857aa1f0209ce11a1313ee46e6808b8f13fe5b8b960a9d7796b77c8d542ad4e9810e85ef897d5593b5d51 languageName: node linkType: hard @@ -2906,9 +2877,9 @@ __metadata: linkType: hard "@types/qs@npm:*": - version: 6.9.16 - resolution: "@types/qs@npm:6.9.16" - checksum: 10c0/a4e871b80fff623755e356fd1f225aea45ff7a29da30f99fddee1a05f4f5f33485b314ab5758145144ed45708f97e44595aa9a8368e9bbc083932f931b12dbb6 + version: 6.9.17 + resolution: "@types/qs@npm:6.9.17" + checksum: 10c0/a183fa0b3464267f8f421e2d66d960815080e8aab12b9aadab60479ba84183b1cdba8f4eff3c06f76675a8e42fe6a3b1313ea76c74f2885c3e25d32499c17d1b languageName: node linkType: hard @@ -3013,12 +2984,12 @@ __metadata: languageName: node linkType: hard -"@types/ws@npm:8.5.12": - version: 8.5.12 - resolution: "@types/ws@npm:8.5.12" +"@types/ws@npm:8.5.13": + version: 8.5.13 + resolution: "@types/ws@npm:8.5.13" dependencies: "@types/node": "npm:*" - checksum: 10c0/3fd77c9e4e05c24ce42bfc7647f7506b08c40a40fe2aea236ef6d4e96fc7cb4006a81ed1b28ec9c457e177a74a72924f4768b7b4652680b42dfd52bc380e15f9 + checksum: 10c0/a5430aa479bde588e69cb9175518d72f9338b6999e3b2ae16fc03d3bdcff8347e486dc031e4ed14601260463c07e1f9a0d7511dfc653712b047c439c680b0b34 languageName: node linkType: hard @@ -3089,13 +3060,13 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:8.12.0": - version: 8.12.0 - resolution: "@typescript-eslint/scope-manager@npm:8.12.0" +"@typescript-eslint/scope-manager@npm:8.14.0": + version: 8.14.0 + resolution: "@typescript-eslint/scope-manager@npm:8.14.0" dependencies: - "@typescript-eslint/types": "npm:8.12.0" - "@typescript-eslint/visitor-keys": "npm:8.12.0" - checksum: 10c0/32aa16748f3a3855b0d263eb2b90ab59741525d3c482a722c5c42494b833bf33dc93f6b9116f83ebd27ace4855ef7aa997ee433ed145796e6ef8dc7ab2afaaa9 + "@typescript-eslint/types": "npm:8.14.0" + "@typescript-eslint/visitor-keys": "npm:8.14.0" + checksum: 10c0/1e1295c6f9febadf63559aad328b23d960510ce6b4c9f74e10d881c3858fa7f1db767cd1af5272d2fe7c9c5c7daebee71854e6f841e413e5d70af282f6616e26 languageName: node linkType: hard @@ -3123,10 +3094,10 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/types@npm:8.12.0": - version: 8.12.0 - resolution: "@typescript-eslint/types@npm:8.12.0" - checksum: 10c0/d1565e32fbb6441de1f881aa1dba27126d25d4e69f9edc8380f54191c5e3d78991e8a7d3fcf01a94ffbdffb75649ef1657ceca00c973e7cbc72687c441b204ff +"@typescript-eslint/types@npm:8.14.0": + version: 8.14.0 + resolution: "@typescript-eslint/types@npm:8.14.0" + checksum: 10c0/7707f900e24e60e6780c5705f69627b7c0ef912cb3b095dfc8f4a0c84e866c66b1c4c10278cf99724560dc66985ec640750c4192786a09b853f9bb4c3ca5a7ce languageName: node linkType: hard @@ -3149,12 +3120,12 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:8.12.0": - version: 8.12.0 - resolution: "@typescript-eslint/typescript-estree@npm:8.12.0" +"@typescript-eslint/typescript-estree@npm:8.14.0": + version: 8.14.0 + resolution: "@typescript-eslint/typescript-estree@npm:8.14.0" dependencies: - "@typescript-eslint/types": "npm:8.12.0" - "@typescript-eslint/visitor-keys": "npm:8.12.0" + "@typescript-eslint/types": "npm:8.14.0" + "@typescript-eslint/visitor-keys": "npm:8.14.0" debug: "npm:^4.3.4" fast-glob: "npm:^3.3.2" is-glob: "npm:^4.0.3" @@ -3164,7 +3135,7 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10c0/17e9951fc91c87cafa4ed708e8922fd4e6f55e23796714e1d8848fb1d830cb2085ca6931f4e1e1c71efc9b57f544ca33478cbae086fea09db56520a1c3a69d75 + checksum: 10c0/5e890d22bd067095f871cf144907a8c302db5b5f014c58906ad58d7f23569951cba805042eac6844744e5abb0d3648c9cc221a91b0703da0a8d6345dc1f83e74 languageName: node linkType: hard @@ -3183,16 +3154,16 @@ __metadata: linkType: hard "@typescript-eslint/utils@npm:^6.0.0 || ^7.0.0 || ^8.0.0": - version: 8.12.0 - resolution: "@typescript-eslint/utils@npm:8.12.0" + version: 8.14.0 + resolution: "@typescript-eslint/utils@npm:8.14.0" dependencies: "@eslint-community/eslint-utils": "npm:^4.4.0" - "@typescript-eslint/scope-manager": "npm:8.12.0" - "@typescript-eslint/types": "npm:8.12.0" - "@typescript-eslint/typescript-estree": "npm:8.12.0" + "@typescript-eslint/scope-manager": "npm:8.14.0" + "@typescript-eslint/types": "npm:8.14.0" + "@typescript-eslint/typescript-estree": "npm:8.14.0" peerDependencies: eslint: ^8.57.0 || ^9.0.0 - checksum: 10c0/b34234b890c4cc2a6e0870b4c992e98563a1311b55e4fcfa6331268c430c3c7b56adeeede9a095decb837edf5f6b5f37da697fab97f8ef66f70e6bbf1aea5e16 + checksum: 10c0/1fcc2651d870832a799a5d1c85fc9421853508a006d6a6073c8316b012489dda77e123d13aea8f53eb9030a2da2c0eb273a6946a9941caa2519b99b33e89b720 languageName: node linkType: hard @@ -3206,13 +3177,13 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:8.12.0": - version: 8.12.0 - resolution: "@typescript-eslint/visitor-keys@npm:8.12.0" +"@typescript-eslint/visitor-keys@npm:8.14.0": + version: 8.14.0 + resolution: "@typescript-eslint/visitor-keys@npm:8.14.0" dependencies: - "@typescript-eslint/types": "npm:8.12.0" + "@typescript-eslint/types": "npm:8.14.0" eslint-visitor-keys: "npm:^3.4.3" - checksum: 10c0/d05a6c3eada99af26840695b71434bf7aa5b50dc99fad64e5862e08ec698c0e53d600eff1049435bf977f243381dda93df884b0243834bfbf4508ed29be246df + checksum: 10c0/d0faf70ed9ecff5e36694bbb161a90bea6db59e0e79a7d4f264d67d565c12b13733d664b736b2730935f013c87ce3155cea954a533d28e99987681bc5f6259c3 languageName: node linkType: hard @@ -3223,154 +3194,154 @@ __metadata: languageName: node linkType: hard -"@webassemblyjs/ast@npm:1.12.1, @webassemblyjs/ast@npm:^1.12.1": - version: 1.12.1 - resolution: "@webassemblyjs/ast@npm:1.12.1" +"@webassemblyjs/ast@npm:1.14.1, @webassemblyjs/ast@npm:^1.12.1": + version: 1.14.1 + resolution: "@webassemblyjs/ast@npm:1.14.1" dependencies: - "@webassemblyjs/helper-numbers": "npm:1.11.6" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.11.6" - checksum: 10c0/ba7f2b96c6e67e249df6156d02c69eb5f1bd18d5005303cdc42accb053bebbbde673826e54db0437c9748e97abd218366a1d13fa46859b23cde611b6b409998c + "@webassemblyjs/helper-numbers": "npm:1.13.2" + "@webassemblyjs/helper-wasm-bytecode": "npm:1.13.2" + checksum: 10c0/67a59be8ed50ddd33fbb2e09daa5193ac215bf7f40a9371be9a0d9797a114d0d1196316d2f3943efdb923a3d809175e1563a3cb80c814fb8edccd1e77494972b languageName: node linkType: hard -"@webassemblyjs/floating-point-hex-parser@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/floating-point-hex-parser@npm:1.11.6" - checksum: 10c0/37fe26f89e18e4ca0e7d89cfe3b9f17cfa327d7daf906ae01400416dbb2e33c8a125b4dc55ad7ff405e5fcfb6cf0d764074c9bc532b9a31a71e762be57d2ea0a +"@webassemblyjs/floating-point-hex-parser@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/floating-point-hex-parser@npm:1.13.2" + checksum: 10c0/0e88bdb8b50507d9938be64df0867f00396b55eba9df7d3546eb5dc0ca64d62e06f8d881ec4a6153f2127d0f4c11d102b6e7d17aec2f26bb5ff95a5e60652412 languageName: node linkType: hard -"@webassemblyjs/helper-api-error@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/helper-api-error@npm:1.11.6" - checksum: 10c0/a681ed51863e4ff18cf38d223429f414894e5f7496856854d9a886eeddcee32d7c9f66290f2919c9bb6d2fc2b2fae3f989b6a1e02a81e829359738ea0c4d371a +"@webassemblyjs/helper-api-error@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/helper-api-error@npm:1.13.2" + checksum: 10c0/31be497f996ed30aae4c08cac3cce50c8dcd5b29660383c0155fce1753804fc55d47fcba74e10141c7dd2899033164e117b3bcfcda23a6b043e4ded4f1003dfb languageName: node linkType: hard -"@webassemblyjs/helper-buffer@npm:1.12.1": - version: 1.12.1 - resolution: "@webassemblyjs/helper-buffer@npm:1.12.1" - checksum: 10c0/0270724afb4601237410f7fd845ab58ccda1d5456a8783aadfb16eaaf3f2c9610c28e4a5bcb6ad880cde5183c82f7f116d5ccfc2310502439d33f14b6888b48a +"@webassemblyjs/helper-buffer@npm:1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/helper-buffer@npm:1.14.1" + checksum: 10c0/0d54105dc373c0fe6287f1091e41e3a02e36cdc05e8cf8533cdc16c59ff05a646355415893449d3768cda588af451c274f13263300a251dc11a575bc4c9bd210 languageName: node linkType: hard -"@webassemblyjs/helper-numbers@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/helper-numbers@npm:1.11.6" +"@webassemblyjs/helper-numbers@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/helper-numbers@npm:1.13.2" dependencies: - "@webassemblyjs/floating-point-hex-parser": "npm:1.11.6" - "@webassemblyjs/helper-api-error": "npm:1.11.6" + "@webassemblyjs/floating-point-hex-parser": "npm:1.13.2" + "@webassemblyjs/helper-api-error": "npm:1.13.2" "@xtuc/long": "npm:4.2.2" - checksum: 10c0/c7d5afc0ff3bd748339b466d8d2f27b908208bf3ff26b2e8e72c39814479d486e0dca6f3d4d776fd9027c1efe05b5c0716c57a23041eb34473892b2731c33af3 + checksum: 10c0/9c46852f31b234a8fb5a5a9d3f027bc542392a0d4de32f1a9c0075d5e8684aa073cb5929b56df565500b3f9cc0a2ab983b650314295b9bf208d1a1651bfc825a languageName: node linkType: hard -"@webassemblyjs/helper-wasm-bytecode@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/helper-wasm-bytecode@npm:1.11.6" - checksum: 10c0/79d2bebdd11383d142745efa32781249745213af8e022651847382685ca76709f83e1d97adc5f0d3c2b8546bf02864f8b43a531fdf5ca0748cb9e4e0ef2acaa5 +"@webassemblyjs/helper-wasm-bytecode@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/helper-wasm-bytecode@npm:1.13.2" + checksum: 10c0/c4355d14f369b30cf3cbdd3acfafc7d0488e086be6d578e3c9780bd1b512932352246be96e034e2a7fcfba4f540ec813352f312bfcbbfe5bcfbf694f82ccc682 languageName: node linkType: hard -"@webassemblyjs/helper-wasm-section@npm:1.12.1": - version: 1.12.1 - resolution: "@webassemblyjs/helper-wasm-section@npm:1.12.1" +"@webassemblyjs/helper-wasm-section@npm:1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/helper-wasm-section@npm:1.14.1" dependencies: - "@webassemblyjs/ast": "npm:1.12.1" - "@webassemblyjs/helper-buffer": "npm:1.12.1" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.11.6" - "@webassemblyjs/wasm-gen": "npm:1.12.1" - checksum: 10c0/0546350724d285ae3c26e6fc444be4c3b5fb824f3be0ec8ceb474179dc3f4430336dd2e36a44b3e3a1a6815960e5eec98cd9b3a8ec66dc53d86daedd3296a6a2 + "@webassemblyjs/ast": "npm:1.14.1" + "@webassemblyjs/helper-buffer": "npm:1.14.1" + "@webassemblyjs/helper-wasm-bytecode": "npm:1.13.2" + "@webassemblyjs/wasm-gen": "npm:1.14.1" + checksum: 10c0/1f9b33731c3c6dbac3a9c483269562fa00d1b6a4e7133217f40e83e975e636fd0f8736e53abd9a47b06b66082ecc976c7384391ab0a68e12d509ea4e4b948d64 languageName: node linkType: hard -"@webassemblyjs/ieee754@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/ieee754@npm:1.11.6" +"@webassemblyjs/ieee754@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/ieee754@npm:1.13.2" dependencies: "@xtuc/ieee754": "npm:^1.2.0" - checksum: 10c0/59de0365da450322c958deadade5ec2d300c70f75e17ae55de3c9ce564deff5b429e757d107c7ec69bd0ba169c6b6cc2ff66293ab7264a7053c829b50ffa732f + checksum: 10c0/2e732ca78c6fbae3c9b112f4915d85caecdab285c0b337954b180460290ccd0fb00d2b1dc4bb69df3504abead5191e0d28d0d17dfd6c9d2f30acac8c4961c8a7 languageName: node linkType: hard -"@webassemblyjs/leb128@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/leb128@npm:1.11.6" +"@webassemblyjs/leb128@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/leb128@npm:1.13.2" dependencies: "@xtuc/long": "npm:4.2.2" - checksum: 10c0/cb344fc04f1968209804de4da018679c5d4708a03b472a33e0fa75657bb024978f570d3ccf9263b7f341f77ecaa75d0e051b9cd4b7bb17a339032cfd1c37f96e + checksum: 10c0/dad5ef9e383c8ab523ce432dfd80098384bf01c45f70eb179d594f85ce5db2f80fa8c9cba03adafd85684e6d6310f0d3969a882538975989919329ac4c984659 languageName: node linkType: hard -"@webassemblyjs/utf8@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/utf8@npm:1.11.6" - checksum: 10c0/14d6c24751a89ad9d801180b0d770f30a853c39f035a15fbc96266d6ac46355227abd27a3fd2eeaa97b4294ced2440a6b012750ae17bafe1a7633029a87b6bee +"@webassemblyjs/utf8@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/utf8@npm:1.13.2" + checksum: 10c0/d3fac9130b0e3e5a1a7f2886124a278e9323827c87a2b971e6d0da22a2ba1278ac9f66a4f2e363ecd9fac8da42e6941b22df061a119e5c0335f81006de9ee799 languageName: node linkType: hard "@webassemblyjs/wasm-edit@npm:^1.12.1": - version: 1.12.1 - resolution: "@webassemblyjs/wasm-edit@npm:1.12.1" + version: 1.14.1 + resolution: "@webassemblyjs/wasm-edit@npm:1.14.1" dependencies: - "@webassemblyjs/ast": "npm:1.12.1" - "@webassemblyjs/helper-buffer": "npm:1.12.1" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.11.6" - "@webassemblyjs/helper-wasm-section": "npm:1.12.1" - "@webassemblyjs/wasm-gen": "npm:1.12.1" - "@webassemblyjs/wasm-opt": "npm:1.12.1" - "@webassemblyjs/wasm-parser": "npm:1.12.1" - "@webassemblyjs/wast-printer": "npm:1.12.1" - checksum: 10c0/972f5e6c522890743999e0ed45260aae728098801c6128856b310dd21f1ee63435fc7b518e30e0ba1cdafd0d1e38275829c1e4451c3536a1d9e726e07a5bba0b + "@webassemblyjs/ast": "npm:1.14.1" + "@webassemblyjs/helper-buffer": "npm:1.14.1" + "@webassemblyjs/helper-wasm-bytecode": "npm:1.13.2" + "@webassemblyjs/helper-wasm-section": "npm:1.14.1" + "@webassemblyjs/wasm-gen": "npm:1.14.1" + "@webassemblyjs/wasm-opt": "npm:1.14.1" + "@webassemblyjs/wasm-parser": "npm:1.14.1" + "@webassemblyjs/wast-printer": "npm:1.14.1" + checksum: 10c0/5ac4781086a2ca4b320bdbfd965a209655fe8a208ca38d89197148f8597e587c9a2c94fb6bd6f1a7dbd4527c49c6844fcdc2af981f8d793a97bf63a016aa86d2 languageName: node linkType: hard -"@webassemblyjs/wasm-gen@npm:1.12.1": - version: 1.12.1 - resolution: "@webassemblyjs/wasm-gen@npm:1.12.1" +"@webassemblyjs/wasm-gen@npm:1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/wasm-gen@npm:1.14.1" dependencies: - "@webassemblyjs/ast": "npm:1.12.1" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.11.6" - "@webassemblyjs/ieee754": "npm:1.11.6" - "@webassemblyjs/leb128": "npm:1.11.6" - "@webassemblyjs/utf8": "npm:1.11.6" - checksum: 10c0/1e257288177af9fa34c69cab94f4d9036ebed611f77f3897c988874e75182eeeec759c79b89a7a49dd24624fc2d3d48d5580b62b67c4a1c9bfbdcd266b281c16 + "@webassemblyjs/ast": "npm:1.14.1" + "@webassemblyjs/helper-wasm-bytecode": "npm:1.13.2" + "@webassemblyjs/ieee754": "npm:1.13.2" + "@webassemblyjs/leb128": "npm:1.13.2" + "@webassemblyjs/utf8": "npm:1.13.2" + checksum: 10c0/d678810d7f3f8fecb2e2bdadfb9afad2ec1d2bc79f59e4711ab49c81cec578371e22732d4966f59067abe5fba8e9c54923b57060a729d28d408e608beef67b10 languageName: node linkType: hard -"@webassemblyjs/wasm-opt@npm:1.12.1": - version: 1.12.1 - resolution: "@webassemblyjs/wasm-opt@npm:1.12.1" +"@webassemblyjs/wasm-opt@npm:1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/wasm-opt@npm:1.14.1" dependencies: - "@webassemblyjs/ast": "npm:1.12.1" - "@webassemblyjs/helper-buffer": "npm:1.12.1" - "@webassemblyjs/wasm-gen": "npm:1.12.1" - "@webassemblyjs/wasm-parser": "npm:1.12.1" - checksum: 10c0/992a45e1f1871033c36987459436ab4e6430642ca49328e6e32a13de9106fe69ae6c0ac27d7050efd76851e502d11cd1ac0e06b55655dfa889ad82f11a2712fb + "@webassemblyjs/ast": "npm:1.14.1" + "@webassemblyjs/helper-buffer": "npm:1.14.1" + "@webassemblyjs/wasm-gen": "npm:1.14.1" + "@webassemblyjs/wasm-parser": "npm:1.14.1" + checksum: 10c0/515bfb15277ee99ba6b11d2232ddbf22aed32aad6d0956fe8a0a0a004a1b5a3a277a71d9a3a38365d0538ac40d1b7b7243b1a244ad6cd6dece1c1bb2eb5de7ee languageName: node linkType: hard -"@webassemblyjs/wasm-parser@npm:1.12.1, @webassemblyjs/wasm-parser@npm:^1.12.1": - version: 1.12.1 - resolution: "@webassemblyjs/wasm-parser@npm:1.12.1" +"@webassemblyjs/wasm-parser@npm:1.14.1, @webassemblyjs/wasm-parser@npm:^1.12.1": + version: 1.14.1 + resolution: "@webassemblyjs/wasm-parser@npm:1.14.1" dependencies: - "@webassemblyjs/ast": "npm:1.12.1" - "@webassemblyjs/helper-api-error": "npm:1.11.6" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.11.6" - "@webassemblyjs/ieee754": "npm:1.11.6" - "@webassemblyjs/leb128": "npm:1.11.6" - "@webassemblyjs/utf8": "npm:1.11.6" - checksum: 10c0/e85cec1acad07e5eb65b92d37c8e6ca09c6ca50d7ca58803a1532b452c7321050a0328c49810c337cc2dfd100c5326a54d5ebd1aa5c339ebe6ef10c250323a0e + "@webassemblyjs/ast": "npm:1.14.1" + "@webassemblyjs/helper-api-error": "npm:1.13.2" + "@webassemblyjs/helper-wasm-bytecode": "npm:1.13.2" + "@webassemblyjs/ieee754": "npm:1.13.2" + "@webassemblyjs/leb128": "npm:1.13.2" + "@webassemblyjs/utf8": "npm:1.13.2" + checksum: 10c0/95427b9e5addbd0f647939bd28e3e06b8deefdbdadcf892385b5edc70091bf9b92fa5faac3fce8333554437c5d85835afef8c8a7d9d27ab6ba01ffab954db8c6 languageName: node linkType: hard -"@webassemblyjs/wast-printer@npm:1.12.1": - version: 1.12.1 - resolution: "@webassemblyjs/wast-printer@npm:1.12.1" +"@webassemblyjs/wast-printer@npm:1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/wast-printer@npm:1.14.1" dependencies: - "@webassemblyjs/ast": "npm:1.12.1" + "@webassemblyjs/ast": "npm:1.14.1" "@xtuc/long": "npm:4.2.2" - checksum: 10c0/39bf746eb7a79aa69953f194943bbc43bebae98bd7cadd4d8bc8c0df470ca6bf9d2b789effaa180e900fab4e2691983c1f7d41571458bd2a26267f2f0c73705a + checksum: 10c0/8d7768608996a052545251e896eac079c98e0401842af8dd4de78fba8d90bd505efb6c537e909cd6dae96e09db3fa2e765a6f26492553a675da56e2db51f9d24 languageName: node linkType: hard @@ -3535,7 +3506,7 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.11.0, acorn@npm:^8.14.0": +"acorn@npm:^8.11.0, acorn@npm:^8.14.0, acorn@npm:^8.4.1, acorn@npm:^8.5.0, acorn@npm:^8.8.2, acorn@npm:^8.9.0": version: 8.14.0 resolution: "acorn@npm:8.14.0" bin: @@ -3544,15 +3515,6 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.4.1, acorn@npm:^8.5.0, acorn@npm:^8.8.2, acorn@npm:^8.9.0": - version: 8.11.3 - resolution: "acorn@npm:8.11.3" - bin: - acorn: bin/acorn - checksum: 10c0/3ff155f8812e4a746fee8ecff1f227d527c4c45655bb1fad6347c3cb58e46190598217551b1500f18542d2bbe5c87120cb6927f5a074a59166fbdd9468f0a299 - languageName: node - linkType: hard - "agent-base@npm:6, agent-base@npm:^6.0.2": version: 6.0.2 resolution: "agent-base@npm:6.0.2" @@ -4352,9 +4314,9 @@ __metadata: linkType: hard "bn.js@npm:^4.0.0, bn.js@npm:^4.1.0, bn.js@npm:^4.11.9": - version: 4.12.0 - resolution: "bn.js@npm:4.12.0" - checksum: 10c0/9736aaa317421b6b3ed038ff3d4491935a01419ac2d83ddcfebc5717385295fcfcf0c57311d90fe49926d0abbd7a9dbefdd8861e6129939177f7e67ebc645b21 + version: 4.12.1 + resolution: "bn.js@npm:4.12.1" + checksum: 10c0/b7f37a0cd5e4b79142b6f4292d518b416be34ae55d6dd6b0f66f96550c8083a50ffbbf8bda8d0ab471158cb81aa74ea4ee58fe33c7802e4a30b13810e98df116 languageName: node linkType: hard @@ -4636,7 +4598,7 @@ __metadata: languageName: node linkType: hard -"bs-logger@npm:0.x, bs-logger@npm:^0.2.6": +"bs-logger@npm:^0.2.6": version: 0.2.6 resolution: "bs-logger@npm:0.2.6" dependencies: @@ -4895,9 +4857,9 @@ __metadata: linkType: hard "caniuse-lite@npm:^1.0.30001669": - version: 1.0.30001673 - resolution: "caniuse-lite@npm:1.0.30001673" - checksum: 10c0/0e73a2b0f06973052e563dec9990a6fd440d510fa2ff54fa50310e736abb86e96c96b43c10e609fc22f2109f98fe76428b70441baf6b1a49f69ccf50c1879f6b + version: 1.0.30001680 + resolution: "caniuse-lite@npm:1.0.30001680" + checksum: 10c0/11a4e7f6f5d5f965cfd4b7dc4aef34e12a26e99647f02b5ac9fd7f7670845473b95ada416a785473237e4b1b67281f7b043c8736c85b77097f6b697e8950b15f languageName: node linkType: hard @@ -5021,9 +4983,9 @@ __metadata: linkType: hard "chrome-trace-event@npm:^1.0.2": - version: 1.0.3 - resolution: "chrome-trace-event@npm:1.0.3" - checksum: 10c0/080ce2d20c2b9e0f8461a380e9585686caa768b1c834a464470c9dc74cda07f27611c7b727a2cd768a9cecd033297fdec4ce01f1e58b62227882c1059dec321c + version: 1.0.4 + resolution: "chrome-trace-event@npm:1.0.4" + checksum: 10c0/3058da7a5f4934b87cf6a90ef5fb68ebc5f7d06f143ed5a4650208e5d7acae47bc03ec844b29fbf5ba7e46e8daa6acecc878f7983a4f4bb7271593da91e61ff5 languageName: node linkType: hard @@ -5403,9 +5365,9 @@ __metadata: languageName: node linkType: hard -"concurrently@npm:9.0.1": - version: 9.0.1 - resolution: "concurrently@npm:9.0.1" +"concurrently@npm:9.1.0": + version: 9.1.0 + resolution: "concurrently@npm:9.1.0" dependencies: chalk: "npm:^4.1.2" lodash: "npm:^4.17.21" @@ -5417,7 +5379,7 @@ __metadata: bin: conc: dist/bin/concurrently.js concurrently: dist/bin/concurrently.js - checksum: 10c0/e2c3d3f3d1b1457ccd27e69f0d840ba4915d571fae4e1088498234ec1174fd547c127de0df6dbe5eb71b2df973b26a6fdc931a9e7e3658f25287ef2106bdb413 + checksum: 10c0/f2f42f94dde508bfbaf47b5ac654db9e8a4bf07d3d7b6267dd058ae6f362eec677ae7c8ede398d081e5fd0d1de5811dc9a53e57d3f1f68e72ac6459db9e0896b languageName: node linkType: hard @@ -5561,9 +5523,9 @@ __metadata: linkType: hard "core-js@npm:^3.9.1": - version: 3.38.1 - resolution: "core-js@npm:3.38.1" - checksum: 10c0/7df063b6f13a54e46515817ac3e235c6c598a4d3de65cd188a061fc250642be313b895fb9fb2f36e1e31890a1bb4ef61d82666a340413f540b7ce3c65689739b + version: 3.39.0 + resolution: "core-js@npm:3.39.0" + checksum: 10c0/f7602069b6afb2e3298eec612a5c1e0c3e6a458930fbfc7a4c5f9ac03426507f49ce395eecdd2d9bae9024f820e44582b67ffe16f2272395af26964f174eeb6b languageName: node linkType: hard @@ -5724,13 +5686,13 @@ __metadata: linkType: hard "cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3": - version: 7.0.3 - resolution: "cross-spawn@npm:7.0.3" + version: 7.0.5 + resolution: "cross-spawn@npm:7.0.5" dependencies: path-key: "npm:^3.1.0" shebang-command: "npm:^2.0.0" which: "npm:^2.0.1" - checksum: 10c0/5738c312387081c98d69c98e105b6327b069197f864a60593245d64c8089c8a0a744e16349281210d56835bb9274130d825a78b2ad6853ca13cfbeffc0c31750 + checksum: 10c0/aa82ce7ac0814a27e6f2b738c5a7cf1fa21a3558a1e42df449fc96541ba3ba731e4d3ecffa4435348808a86212f287c6f20a1ee551ef1ff95d01cfec5f434944 languageName: node linkType: hard @@ -6641,9 +6603,9 @@ __metadata: linkType: hard "electron-to-chromium@npm:^1.5.41": - version: 1.5.47 - resolution: "electron-to-chromium@npm:1.5.47" - checksum: 10c0/5f8c4a9f0698695960f7bef5242d52b1043020ce50b51fb534409a768847f9bdc9672cb4a6a560eeb8f8b47a04327ae9b31b2cee376cb637b3eb04a4daeaa3b8 + version: 1.5.55 + resolution: "electron-to-chromium@npm:1.5.55" + checksum: 10c0/1b9e0970a591d342cf4d4c95b63bcdb8bffed01edb7c8baed8dd54ea769c8b33c07484c94a031a20363a8129ca2ad1d612ce4ca55ec831244240ae1e6bcdf07c languageName: node linkType: hard @@ -6745,17 +6707,7 @@ __metadata: languageName: node linkType: hard -"enhanced-resolve@npm:^5.0.0, enhanced-resolve@npm:^5.7.0": - version: 5.16.0 - resolution: "enhanced-resolve@npm:5.16.0" - dependencies: - graceful-fs: "npm:^4.2.4" - tapable: "npm:^2.2.0" - checksum: 10c0/dd69669cbb638ccacefd03e04d5e195ee6a99b7f5f8012f86d2df7781834de357923e06064ea621137c4ce0b37cc12b872b4e6d1ac6ab15fe98e7f1dfbbb08c4 - languageName: node - linkType: hard - -"enhanced-resolve@npm:^5.15.0, enhanced-resolve@npm:^5.17.1": +"enhanced-resolve@npm:^5.0.0, enhanced-resolve@npm:^5.15.0, enhanced-resolve@npm:^5.17.1, enhanced-resolve@npm:^5.7.0": version: 5.17.1 resolution: "enhanced-resolve@npm:5.17.1" dependencies: @@ -7163,7 +7115,7 @@ __metadata: languageName: node linkType: hard -"eslint-module-utils@npm:^2.12.0": +"eslint-module-utils@npm:^2.12.0, eslint-module-utils@npm:^2.8.1": version: 2.12.0 resolution: "eslint-module-utils@npm:2.12.0" dependencies: @@ -7175,18 +7127,6 @@ __metadata: languageName: node linkType: hard -"eslint-module-utils@npm:^2.8.1": - version: 2.8.2 - resolution: "eslint-module-utils@npm:2.8.2" - dependencies: - debug: "npm:^3.2.7" - peerDependenciesMeta: - eslint: - optional: true - checksum: 10c0/98c5ca95db75507b148c05d157b287116c677bfc9ca6bef4d5455c8b199eb2c35b9204a15ca7a3497085daef8ca3a3f579bd9e753ad4ad4df6256e4ef1107c51 - languageName: node - linkType: hard - "eslint-plugin-eslint-comments@npm:3.2.0": version: 3.2.0 resolution: "eslint-plugin-eslint-comments@npm:3.2.0" @@ -9515,16 +9455,7 @@ __metadata: languageName: node linkType: hard -"is-core-module@npm:^2.13.0, is-core-module@npm:^2.5.0": - version: 2.13.1 - resolution: "is-core-module@npm:2.13.1" - dependencies: - hasown: "npm:^2.0.0" - checksum: 10c0/2cba9903aaa52718f11c4896dabc189bab980870aae86a62dc0d5cedb546896770ee946fb14c84b7adf0735f5eaea4277243f1b95f5cefa90054f92fbcac2518 - languageName: node - linkType: hard - -"is-core-module@npm:^2.15.1": +"is-core-module@npm:^2.13.0, is-core-module@npm:^2.15.1, is-core-module@npm:^2.5.0": version: 2.15.1 resolution: "is-core-module@npm:2.15.1" dependencies: @@ -11238,7 +11169,7 @@ __metadata: languageName: node linkType: hard -"lodash.memoize@npm:4.x, lodash.memoize@npm:^4.1.2": +"lodash.memoize@npm:^4.1.2": version: 4.1.2 resolution: "lodash.memoize@npm:4.1.2" checksum: 10c0/c8713e51eccc650422716a14cece1809cfe34bc5ab5e242b7f8b4e2241c2483697b971a604252807689b9dd69bfe3a98852e19a5b89d506b000b4187a1285df8 @@ -11485,7 +11416,7 @@ __metadata: languageName: node linkType: hard -"make-error@npm:1.x, make-error@npm:^1.1.1, make-error@npm:^1.3.6": +"make-error@npm:^1.1.1, make-error@npm:^1.3.6": version: 1.3.6 resolution: "make-error@npm:1.3.6" checksum: 10c0/171e458d86854c6b3fc46610cfacf0b45149ba043782558c6875d9f42f222124384ad0b468c92e996d815a8a2003817a710c0a160e49c1c394626f76fa45396f @@ -12408,7 +12339,7 @@ __metadata: "@tsconfig/node16": "npm:1.0.4" "@typescript-eslint/eslint-plugin": "npm:7.18.0" "@typescript-eslint/parser": "npm:7.18.0" - concurrently: "npm:9.0.1" + concurrently: "npm:9.1.0" dotenv: "npm:16.4.5" eslint: "npm:8.57.1" eslint-config-prettier: "npm:9.1.0" @@ -12422,7 +12353,8 @@ __metadata: jest: "npm:29.7.0" lint-staged: "npm:15.2.10" neo4j-driver: "npm:5.26.0" - prettier: "npm:2.8.8" + prettier: "npm:3.3.3" + prettier-2: "npm:prettier@2.8.8" set-tz: "npm:0.2.0" ts-jest: "npm:29.2.5" typescript: "npm:5.1.6" @@ -12461,14 +12393,14 @@ __metadata: languageName: node linkType: hard -"nock@npm:13.5.5": - version: 13.5.5 - resolution: "nock@npm:13.5.5" +"nock@npm:13.5.6": + version: 13.5.6 + resolution: "nock@npm:13.5.6" dependencies: debug: "npm:^4.1.0" json-stringify-safe: "npm:^5.0.1" propagate: "npm:^2.0.0" - checksum: 10c0/58be4dda214d6e1914232ae41a3ac4f4e05622f71eb82825816f3030e0343bd54c1001878a6bce8412067c1059730919f3d600069d76f1336da11f47bd3b5d40 + checksum: 10c0/94249a294176a6e521bbb763c214de4aa6b6ab63dff1e299aaaf455886a465d38906891d7f24570d94a43b1e376c239c54d89ff7697124bc57ef188006acc25e languageName: node linkType: hard @@ -12736,9 +12668,9 @@ __metadata: linkType: hard "object-inspect@npm:^1.13.1, object-inspect@npm:^1.6.0": - version: 1.13.2 - resolution: "object-inspect@npm:1.13.2" - checksum: 10c0/b97835b4c91ec37b5fd71add84f21c3f1047d1d155d00c0fcd6699516c256d4fcc6ff17a1aced873197fe447f91a3964178fd2a67a1ee2120cdaf60e81a050b4 + version: 1.13.3 + resolution: "object-inspect@npm:1.13.3" + checksum: 10c0/cc3f15213406be89ffdc54b525e115156086796a515410a8d390215915db9f23c8eab485a06f1297402f440a33715fe8f71a528c1dcbad6e1a3bcaf5a46921d4 languageName: node linkType: hard @@ -13408,20 +13340,13 @@ __metadata: languageName: node linkType: hard -"picocolors@npm:^1.0.0": +"picocolors@npm:^1.0.0, picocolors@npm:^1.1.0, picocolors@npm:^1.1.1": version: 1.1.1 resolution: "picocolors@npm:1.1.1" checksum: 10c0/e2e3e8170ab9d7c7421969adaa7e1b31434f789afb9b3f115f6b96d91945041ac3ceb02e9ec6fe6510ff036bcc0bf91e69a1772edc0b707e12b19c0f2d6bcf58 languageName: node linkType: hard -"picocolors@npm:^1.1.0": - version: 1.1.0 - resolution: "picocolors@npm:1.1.0" - checksum: 10c0/86946f6032148801ef09c051c6fb13b5cf942eaf147e30ea79edb91dd32d700934edebe782a1078ff859fb2b816792e97ef4dab03d7f0b804f6b01a0df35e023 - languageName: node - linkType: hard - "picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.2.3, picomatch@npm:^2.3.1": version: 2.3.1 resolution: "picomatch@npm:2.3.1" @@ -13675,13 +13600,13 @@ __metadata: linkType: hard "postcss@npm:^8.1.10": - version: 8.4.47 - resolution: "postcss@npm:8.4.47" + version: 8.4.48 + resolution: "postcss@npm:8.4.48" dependencies: nanoid: "npm:^3.3.7" - picocolors: "npm:^1.1.0" + picocolors: "npm:^1.1.1" source-map-js: "npm:^1.2.1" - checksum: 10c0/929f68b5081b7202709456532cee2a145c1843d391508c5a09de2517e8c4791638f71dd63b1898dba6712f8839d7a6da046c72a5e44c162e908f5911f57b5f44 + checksum: 10c0/d586361fda12fc7ab5650ce9b5763fc61d6ea2cecac9da98fceea6a3f27e42ed34db830582411bc06743492d9bb414c52b0c81da65440682d244d692da2f928a languageName: node linkType: hard @@ -13706,7 +13631,7 @@ __metadata: languageName: node linkType: hard -"prettier@npm:2.8.8, prettier@npm:^2.7.1": +"prettier-2@npm:prettier@2.8.8, prettier@npm:^2.7.1": version: 2.8.8 resolution: "prettier@npm:2.8.8" bin: @@ -13715,6 +13640,15 @@ __metadata: languageName: node linkType: hard +"prettier@npm:3.3.3": + version: 3.3.3 + resolution: "prettier@npm:3.3.3" + bin: + prettier: bin/prettier.cjs + checksum: 10c0/b85828b08e7505716324e4245549b9205c0cacb25342a030ba8885aba2039a115dbcf75a0b7ca3b37bc9d101ee61fab8113fc69ca3359f2a226f1ecc07ad2e26 + languageName: node + linkType: hard + "pretty-bytes@npm:^5.4.1": version: 5.6.0 resolution: "pretty-bytes@npm:5.6.0" @@ -13893,9 +13827,11 @@ __metadata: linkType: hard "psl@npm:^1.1.28, psl@npm:^1.1.33": - version: 1.9.0 - resolution: "psl@npm:1.9.0" - checksum: 10c0/6a3f805fdab9442f44de4ba23880c4eba26b20c8e8e0830eff1cb31007f6825dace61d17203c58bfe36946842140c97a1ba7f67bc63ca2d88a7ee052b65d97ab + version: 1.10.0 + resolution: "psl@npm:1.10.0" + dependencies: + punycode: "npm:^2.3.1" + checksum: 10c0/aeac84ed76a170caa8dafad2e51200d38b657fdab3ae258d98fa16db8bb82522dfb00ad96db99c493f185848d9be06b59d5d60551d871e5be1974a2497d8b51a languageName: node linkType: hard @@ -13941,7 +13877,7 @@ __metadata: languageName: node linkType: hard -"punycode@npm:^2.1.0, punycode@npm:^2.1.1": +"punycode@npm:^2.1.0, punycode@npm:^2.1.1, punycode@npm:^2.3.1": version: 2.3.1 resolution: "punycode@npm:2.3.1" checksum: 10c0/14f76a8206bc3464f794fb2e3d3cc665ae416c01893ad7a02b23766eb07159144ee612ad67af5e84fa4479ccfe67678c4feb126b0485651b302babf66f04f9e9 @@ -13989,7 +13925,7 @@ __metadata: languageName: node linkType: hard -"qs@npm:6.13.0, qs@npm:^6.12.3": +"qs@npm:6.13.0, qs@npm:^6.11.0, qs@npm:^6.12.3": version: 6.13.0 resolution: "qs@npm:6.13.0" dependencies: @@ -13998,15 +13934,6 @@ __metadata: languageName: node linkType: hard -"qs@npm:^6.11.0": - version: 6.12.1 - resolution: "qs@npm:6.12.1" - dependencies: - side-channel: "npm:^1.0.6" - checksum: 10c0/439e6d7c6583e7c69f2cab2c39c55b97db7ce576e4c7c469082b938b7fc8746e8d547baacb69b4cd2b6666484776c3f4840ad7163a4c5326300b0afa0acdd84b - languageName: node - linkType: hard - "qs@npm:~6.5.2": version: 6.5.3 resolution: "qs@npm:6.5.3" @@ -16113,11 +16040,11 @@ __metadata: linkType: hard "ts-api-utils@npm:^1.3.0": - version: 1.3.0 - resolution: "ts-api-utils@npm:1.3.0" + version: 1.4.0 + resolution: "ts-api-utils@npm:1.4.0" peerDependencies: typescript: ">=4.2.0" - checksum: 10c0/f54a0ba9ed56ce66baea90a3fa087a484002e807f28a8ccb2d070c75e76bde64bd0f6dce98b3802834156306050871b67eec325cb4e918015a360a3f0868c77c + checksum: 10c0/1b2bfa50ea52771d564bb143bb69010d25cda03ed573095fbac9b86f717012426443af6647e00e3db70fca60360482a30c1be7cf73c3521c321f6bf5e3594ea0 languageName: node linkType: hard @@ -16128,7 +16055,7 @@ __metadata: languageName: node linkType: hard -"ts-jest@npm:29.2.5": +"ts-jest@npm:29.2.5, ts-jest@npm:^29.1.1": version: 29.2.5 resolution: "ts-jest@npm:29.2.5" dependencies: @@ -16165,39 +16092,6 @@ __metadata: languageName: node linkType: hard -"ts-jest@npm:^29.1.1": - version: 29.1.2 - resolution: "ts-jest@npm:29.1.2" - dependencies: - bs-logger: "npm:0.x" - fast-json-stable-stringify: "npm:2.x" - jest-util: "npm:^29.0.0" - json5: "npm:^2.2.3" - lodash.memoize: "npm:4.x" - make-error: "npm:1.x" - semver: "npm:^7.5.3" - yargs-parser: "npm:^21.0.1" - peerDependencies: - "@babel/core": ">=7.0.0-beta.0 <8" - "@jest/types": ^29.0.0 - babel-jest: ^29.0.0 - jest: ^29.0.0 - typescript: ">=4.3 <6" - peerDependenciesMeta: - "@babel/core": - optional: true - "@jest/types": - optional: true - babel-jest: - optional: true - esbuild: - optional: true - bin: - ts-jest: cli.js - checksum: 10c0/c2f51f0241f89d127d41392decbcb83b5dfd5e57ab9d50220aa7b7e2f9b3f3b07ccdbba33311284df1c41941879e4ddfad44b15a9d0da4b74bd1b98702b729df - languageName: node - linkType: hard - "ts-loader@npm:9.5.1": version: 9.5.1 resolution: "ts-loader@npm:9.5.1" @@ -16301,9 +16195,9 @@ __metadata: linkType: hard "tslib@npm:^2.0.0, tslib@npm:^2.0.1, tslib@npm:^2.1.0, tslib@npm:^2.3.1, tslib@npm:^2.4.0, tslib@npm:^2.5.0, tslib@npm:^2.6.1, tslib@npm:^2.6.2, tslib@npm:^2.7.0": - version: 2.8.0 - resolution: "tslib@npm:2.8.0" - checksum: 10c0/31e4d14dc1355e9b89e4d3c893a18abb7f90b6886b089c2da91224d0a7752c79f3ddc41bc1aa0a588ac895bd97bb99c5bc2bfdb2f86de849f31caeb3ba79bbe5 + version: 2.8.1 + resolution: "tslib@npm:2.8.1" + checksum: 10c0/9c4759110a19c53f992d9aae23aac5ced636e99887b51b9e61def52611732872ff7668757d4e4c61f19691e36f4da981cd9485e869b4a7408d689f6bf1f14e62 languageName: node linkType: hard @@ -16632,7 +16526,7 @@ __metadata: languageName: node linkType: hard -"undici-types@npm:~6.19.2, undici-types@npm:~6.19.8": +"undici-types@npm:~6.19.8": version: 6.19.8 resolution: "undici-types@npm:6.19.8" checksum: 10c0/078afa5990fba110f6824823ace86073b4638f1d5112ee26e790155f481f2a868cc3e0615505b6f4282bdf74a3d8caad715fd809e870c2bb0704e3ea6082f344 @@ -17411,7 +17305,7 @@ __metadata: languageName: node linkType: hard -"yargs-parser@npm:^21.0.1, yargs-parser@npm:^21.1.1": +"yargs-parser@npm:^21.1.1": version: 21.1.1 resolution: "yargs-parser@npm:21.1.1" checksum: 10c0/f84b5e48169479d2f402239c59f084cfd1c3acc197a05c59b98bab067452e6b3ea46d4dd8ba2985ba7b3d32a343d77df0debd6b343e5dae3da2aab2cdf5886b2 From 8fecd7953e2334be1a624b7248dab50c272c1ba5 Mon Sep 17 00:00:00 2001 From: Darrell Warde Date: Wed, 13 Nov 2024 16:33:38 +0000 Subject: [PATCH 6/6] Update schema tests --- .../remove-deprecated/implicit-set.test.ts | 92 ++----------------- 1 file changed, 6 insertions(+), 86 deletions(-) diff --git a/packages/graphql/tests/schema/remove-deprecated/implicit-set.test.ts b/packages/graphql/tests/schema/remove-deprecated/implicit-set.test.ts index 57af0fb5ee..98a080ddc1 100644 --- a/packages/graphql/tests/schema/remove-deprecated/implicit-set.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/implicit-set.test.ts @@ -92,19 +92,8 @@ describe("Implicit SET field", () => { } input ActedInUpdateInput { -<<<<<<<< HEAD:packages/graphql/tests/schema/remove-deprecated/implicit-set.test.ts role: String @deprecated(reason: \\"Please use the explicit _SET field\\") role_SET: String -======== - leadRole: Boolean @deprecated(reason: \\"Please use the explicit _SET field\\") - leadRole_SET: Boolean - screenTime: Int @deprecated(reason: \\"Please use the explicit _SET field\\") - screenTime_DECREMENT: Int - screenTime_INCREMENT: Int - screenTime_SET: Int - startDate: Date @deprecated(reason: \\"Please use the explicit _SET field\\") - startDate_SET: Date ->>>>>>>> upstream/7.x:packages/graphql/tests/schema/remove-deprecated/directed-argument.test.ts } input ActedInWhere { @@ -120,9 +109,9 @@ describe("Implicit SET field", () => { } type Actor { - movies(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: MovieWhere): ActorMovieMoviesAggregationSelection - moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection + moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! name: String } @@ -284,10 +273,6 @@ describe("Implicit SET field", () => { input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] -<<<<<<<< HEAD:packages/graphql/tests/schema/remove-deprecated/implicit-set.test.ts -======== - name: String @deprecated(reason: \\"Please use the explicit _SET field\\") ->>>>>>>> upstream/7.x:packages/graphql/tests/schema/remove-deprecated/directed-argument.test.ts name_SET: String } @@ -360,75 +345,15 @@ describe("Implicit SET field", () => { relationshipsDeleted: Int! } -<<<<<<<< HEAD:packages/graphql/tests/schema/remove-deprecated/implicit-set.test.ts -======== - type Genre { - id: ID - } - - type GenreAggregateSelection { - count: Int! - id: IDAggregateSelection! - } - - input GenreCreateInput { - id: ID - } - - type GenreEdge { - cursor: String! - node: Genre! - } - - input GenreOptions { - limit: Int - offset: Int - \\"\\"\\" - Specify one or more GenreSort objects to sort Genres by. The sorts will be applied in the order in which they are arranged in the array. - \\"\\"\\" - sort: [GenreSort!] - } - - \\"\\"\\" - Fields to sort Genres by. The order in which sorts are applied is not guaranteed when specifying many fields in one GenreSort object. - \\"\\"\\" - input GenreSort { - id: SortDirection - } - - input GenreUpdateInput { - id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") - id_SET: ID - } - - input GenreWhere { - AND: [GenreWhere!] - NOT: GenreWhere - OR: [GenreWhere!] - id: ID @deprecated(reason: \\"Please use the explicit _EQ version\\") - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - } - - type GenresConnection { - edges: [GenreEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - ->>>>>>>> upstream/7.x:packages/graphql/tests/schema/remove-deprecated/directed-argument.test.ts type IDAggregateSelection { longest: ID shortest: ID } type Movie { - actors(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -595,12 +520,7 @@ describe("Implicit SET field", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] -<<<<<<<< HEAD:packages/graphql/tests/schema/remove-deprecated/implicit-set.test.ts id_SET: ID -======== - title: String @deprecated(reason: \\"Please use the explicit _SET field\\") - title_SET: String ->>>>>>>> upstream/7.x:packages/graphql/tests/schema/remove-deprecated/directed-argument.test.ts } input MovieWhere {